Compare with

Comparison of Hibernate with H2 server vs ObjectDB embedded

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
 Hibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embedded
Basic Person Test4.61003.01003.8100
Element Collection Test3.71001.11002.4100
Inheritance Test6.71003.11004.9100
Indexing Test8.21004.21006.2100
Graph (Binary Tree) Test3.488.43.91003.794.2
Multithreading Test6.81005.01005.9100
All Tests5.698.13.41004.599.0

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
 Hibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embedded
Basic Person Test3.11006.01004.6100
Element Collection Test1.01001.11001.0100
Inheritance Test2.91007.61005.2100
Indexing Test2.61007.01004.8100
Graph (Binary Tree) Test0.421001.11000.78100
Multithreading Test6.510010.51008.5100
All Tests2.81005.61004.2100

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
 Hibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embedded
Basic Person Test3.71001.01002.3100
Element Collection Test3.71000.631002.2100
Inheritance Test3.21001.41002.3100
Indexing Test1.71005.81003.8100
Multithreading Test1.11000.881001.0100
All Tests2.71001.91002.3100

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
 Hibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embedded
Basic Person Test2.91001.81002.4100
Element Collection Test2.61001.11001.9100
Inheritance Test3.21002.51002.9100
Indexing Test2.91002.71002.8100
Graph (Binary Tree) Test1.21000.431000.79100
Multithreading Test5.61002.41004.0100
All Tests3.11001.81002.5100

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
 Hibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embedded
Basic Person Test3.81002.41003.1100
Element Collection Test1.91001.11001.5100
Inheritance Test3.71002.51003.1100
Indexing Test7.61003.11005.3100
Graph (Binary Tree) Test0.991000.911000.95100
Multithreading Test6.11007.31006.7100
All Tests4.01002.91003.5100

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
 Hibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embeddedHibernate
H2 server
ObjectDB embedded
Basic Person Test3.61002.81003.2100
Element Collection Test2.61001.01001.8100
Inheritance Test4.01003.41003.7100
Indexing Test4.61004.51004.6100
Graph (Binary Tree) Test1.597.11.61001.698.5
Multithreading Test5.21005.21005.2100
All Tests3.799.63.21003.499.8

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