Compare with

Comparison of ObjectDB embedded vs Hibernate with H2 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
 ObjectDB embeddedHibernate
H2 embedded
ObjectDB embeddedHibernate
H2 embedded
ObjectDB embeddedHibernate
H2 embedded
Basic Person Test10018.11009.010013.5
Element Collection Test10013.01006.81009.9
Inheritance Test10021.01009.410015.2
Indexing Test10029.910018.410024.1
Graph (Binary Tree) Test88.417.210020.194.218.7
Multithreading Test10036.910011.510024.2
All Tests98.122.610012.599.017.6

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 ObjectDB embeddedHibernate
H2 embedded
ObjectDB embeddedHibernate
H2 embedded
ObjectDB embeddedHibernate
H2 embedded
Basic Person Test10016.610013.310015.0
Element Collection Test1004.31004.01004.1
Inheritance Test10010.410017.510013.9
Indexing Test10010.810015.210013.0
Graph (Binary Tree) Test1002.51004.01003.3
Multithreading Test10016.210015.710015.9
All Tests10010.110011.610010.9

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 ObjectDB embeddedHibernate
H2 embedded
ObjectDB embeddedHibernate
H2 embedded
ObjectDB embeddedHibernate
H2 embedded
Basic Person Test1004.51001.21002.8
Element Collection Test1004.41001.41002.9
Inheritance Test1003.11001.51002.3
Indexing Test1006.610010.51008.6
Multithreading Test1001.21000.591000.89
All Tests1004.01003.01003.5

The results above show that in general ObjectDB embedded is much more efficient than Hibernate with H2 embedded in executing the tested JPA queries. Comparing the normalized speed of Hibernate with H2 embedded database (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 embedded.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 ObjectDB embeddedHibernate
H2 embedded
ObjectDB embeddedHibernate
H2 embedded
ObjectDB embeddedHibernate
H2 embedded
Basic Person Test10012.11006.51009.3
Element Collection Test1007.41005.31006.3
Inheritance Test10010.81008.51009.6
Indexing Test10010.01007.51008.8
Graph (Binary Tree) Test1004.41002.31003.4
Multithreading Test10016.21004.010010.1
All Tests10010.11005.71007.9

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 ObjectDB embeddedHibernate
H2 embedded
ObjectDB embeddedHibernate
H2 embedded
ObjectDB embeddedHibernate
H2 embedded
Basic Person Test10019.710011.410015.5
Element Collection Test1006.91004.51005.7
Inheritance Test10015.610012.910014.2
Indexing Test10023.210012.410017.8
Graph (Binary Tree) Test1004.01004.21004.1
Multithreading Test10027.410022.710025.0
All Tests10016.110011.410013.7

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

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

Comparison of database storage efficiency (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 ObjectDB embeddedHibernate
H2 embedded
ObjectDB embeddedHibernate
H2 embedded
ObjectDB embeddedHibernate
H2 embedded
Basic Person Test10027.010027.010027.0
Element Collection Test10030.610030.610030.6
Inheritance Test10027.010027.010027.0
Indexing Test10031.610032.110031.9
Graph (Binary Tree) Test10028.510021.410025.0
Multithreading Test91.133.922.09.256.621.5
All Tests98.529.887.024.692.827.2

The results above show that in general ObjectDB embedded is much more efficient than Hibernate with H2 embedded in using disk space. Comparing the normalized score of Hibernate with H2 embedded database (27.2) to the normalized score of ObjectDB embedded database (92.8) reveals that in these tests, ObjectDB embedded is 3.4 times more efficient than Hibernate with H2 embedded.

A large gap has been detected when using graphs of objects with large transaction size. Comparing the normalized score of Hibernate with H2 embedded database (21.4) to the normalized score of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 4.7 times more efficient than Hibernate with H2 embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 ObjectDB embeddedHibernate
H2 embedded
ObjectDB embeddedHibernate
H2 embedded
ObjectDB embeddedHibernate
H2 embedded
Basic Person Test10014.21008.310011.2
Element Collection Test1007.21004.41005.8
Inheritance Test10012.21009.910011.0
Indexing Test10016.110012.810014.5
Graph (Binary Tree) Test97.17.01007.798.57.3
Multithreading Test10019.610010.910015.2
All Tests99.612.91009.099.811.0

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

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 embedded database (4.4) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 22.7 times faster than Hibernate with H2 embedded.

Other Head to Head DBMS/JPA Comparisons