Compare with

Comparison of ObjectDB embedded vs Hibernate with H2 server

Each of the following tables focuses on a specific database operation, where the last table presents average results comparison.

Speed comparison of JPA database persistence operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
Basic Person Test1004.61003.01003.8
Element Collection Test1003.71001.11002.4
Inheritance Test1006.71003.11004.9
Indexing Test1008.21004.21006.2
Graph (Binary Tree) Test88.43.41003.994.23.7
Multithreading Test1006.81005.01005.9
All Tests98.15.61003.499.04.5

The results above show that in general ObjectDB embedded is much more efficient than Hibernate with H2 server in persisting JPA entity objects to the database. Comparing the normalized speed of Hibernate with H2 database server (4.5) to the normalized speed of ObjectDB embedded database (99.0) reveals that in these tests, ObjectDB embedded is 22.0 times faster than Hibernate with H2 server.

A huge performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of Hibernate with H2 database server (1.1) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 90.9 times faster than Hibernate with H2 server.

Speed comparison of JPA database retrieval operations (normalized score, higher is better)

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
Basic Person Test1003.11006.01004.6
Element Collection Test1001.01001.11001.0
Inheritance Test1002.91007.61005.2
Indexing Test1002.61007.01004.8
Graph (Binary Tree) Test1000.421001.11000.78
Multithreading Test1006.510010.51008.5
All Tests1002.81005.61004.2

The results above show that in general ObjectDB embedded is much more efficient than Hibernate with H2 server in retrieving JPA entity objects from the database. Comparing the normalized speed of Hibernate with H2 database server (4.2) to the normalized speed of ObjectDB embedded database (100) reveals that in these tests, ObjectDB embedded is 23.8 times faster than Hibernate with H2 server.

A huge performance gap has been detected when using graphs of objects with small retrieval size. Comparing the normalized speed of Hibernate with H2 database server (0.42) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 238 times faster than Hibernate with H2 server.

Speed comparison of JPA database query operations (normalized score, higher is better)

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
Basic Person Test1003.71001.01002.3
Element Collection Test1003.71000.631002.2
Inheritance Test1003.21001.41002.3
Indexing Test1001.71005.81003.8
Multithreading Test1001.11000.881001.0
All Tests1002.71001.91002.3

The results above show that in general ObjectDB embedded is much more efficient than Hibernate with H2 server in executing the tested JPA queries. Comparing the normalized speed of Hibernate with H2 database server (2.3) to the normalized speed of ObjectDB embedded database (100) reveals that in these tests, ObjectDB embedded is 43.5 times faster than Hibernate with H2 server.

A huge performance gap has been detected when using JPA element collections with large retrieval size. Comparing the normalized speed of Hibernate with H2 database server (0.63) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 159 times faster than Hibernate with H2 server.

Speed comparison of JPA database update operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
Basic Person Test1002.91001.81002.4
Element Collection Test1002.61001.11001.9
Inheritance Test1003.21002.51002.9
Indexing Test1002.91002.71002.8
Graph (Binary Tree) Test1001.21000.431000.79
Multithreading Test1005.61002.41004.0
All Tests1003.11001.81002.5

The results above show that in general ObjectDB embedded is much more efficient than Hibernate with H2 server in updating JPA entity objects in the database. Comparing the normalized speed of Hibernate with H2 database server (2.5) to the normalized speed of ObjectDB embedded database (100) reveals that in these tests, ObjectDB embedded is 40.0 times faster than Hibernate with H2 server.

A huge performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of Hibernate with H2 database server (0.43) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 233 times faster than Hibernate with H2 server.

Speed comparison of JPA database removal operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
Basic Person Test1003.81002.41003.1
Element Collection Test1001.91001.11001.5
Inheritance Test1003.71002.51003.1
Indexing Test1007.61003.11005.3
Graph (Binary Tree) Test1000.991000.911000.95
Multithreading Test1006.11007.31006.7
All Tests1004.01002.91003.5

The results above show that in general ObjectDB embedded is much more efficient than Hibernate with H2 server in deleting JPA entity objects from the database. Comparing the normalized speed of Hibernate with H2 database server (3.5) to the normalized speed of ObjectDB embedded database (100) reveals that in these tests, ObjectDB embedded is 28.6 times faster than Hibernate with H2 server.

A huge performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of Hibernate with H2 database server (0.91) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 110 times faster than Hibernate with H2 server.

Comparison of JPA/Database speed - the averages (normalized score, higher is better)

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
Basic Person Test1003.61002.81003.2
Element Collection Test1002.61001.01001.8
Inheritance Test1004.01003.41003.7
Indexing Test1004.61004.51004.6
Graph (Binary Tree) Test97.11.51001.698.51.6
Multithreading Test1005.21005.21005.2
All Tests99.63.71003.299.83.4

The results above show that in general ObjectDB embedded is much more efficient than Hibernate with H2 server in performing JPA database operations. Comparing the normalized speed of Hibernate with H2 database server (3.4) to the normalized speed of ObjectDB embedded database (99.8) reveals that in these tests, ObjectDB embedded is 29.4 times faster than Hibernate with H2 server.

A huge performance gap has been detected when using JPA element collections with large transaction/retrieval size. Comparing the normalized speed of Hibernate with H2 database server (1.0) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 100 times faster than Hibernate with H2 server.

Other Head to Head DBMS/JPA Comparisons