Compare with

Comparison of OpenJPA with H2 embedded 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
 OpenJPA
H2 embedded
ObjectDB embeddedOpenJPA
H2 embedded
ObjectDB embeddedOpenJPA
H2 embedded
ObjectDB embedded
Basic Person Test17.11005.810011.5100
Element Collection Test10.91004.91007.9100
Inheritance Test14.31005.910010.1100
Indexing Test24.410013.710019.1100
Graph (Binary Tree) Test6.888.46.71006.794.2
Multithreading Test34.210010.210022.2100
All Tests17.998.17.910012.999.0

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
H2 embedded
ObjectDB embeddedOpenJPA
H2 embedded
ObjectDB embeddedOpenJPA
H2 embedded
ObjectDB embedded
Basic Person Test14.610027.210020.9100
Element Collection Test0.00461004.31002.1100
Inheritance Test0.0111007.41003.7100
Indexing Test17.010035.010026.0100
Graph (Binary Tree) Test1.01001.41001.2100
Multithreading Test18.710027.610023.1100
All Tests8.610017.110012.8100

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

A huge performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with H2 embedded database (0.0046) to the normalized speed of ObjectDB embedded database (100) reveals that in that case, ObjectDB embedded is 21,739 times faster than OpenJPA with H2 embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
H2 embedded
ObjectDB embeddedOpenJPA
H2 embedded
ObjectDB embeddedOpenJPA
H2 embedded
ObjectDB embedded
Basic Person Test5.01001.11003.1100
Element Collection Test1.71001.31001.5100
Inheritance Test2.21001.21001.7100
Indexing Test13.810023.210018.5100
Multithreading Test1.41000.601000.99100
All Tests4.81005.51005.1100

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
H2 embedded
ObjectDB embeddedOpenJPA
H2 embedded
ObjectDB embeddedOpenJPA
H2 embedded
ObjectDB embedded
Basic Person Test10.01006.01008.0100
Element Collection Test0.0111003.81001.9100
Inheritance Test0.0461005.01002.5100
Indexing Test8.91007.01008.0100
Graph (Binary Tree) Test2.41001.31001.9100
Multithreading Test16.61004.310010.4100
All Tests6.31004.61005.4100

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
H2 embedded
ObjectDB embeddedOpenJPA
H2 embedded
ObjectDB embeddedOpenJPA
H2 embedded
ObjectDB embedded
Basic Person Test18.310011.110014.7100
Element Collection Test0.0121002.91001.4100
Inheritance Test0.0301006.61003.3100
Indexing Test23.21009.710016.4100
Graph (Binary Tree) Test1.81002.41002.1100
Multithreading Test31.210017.310024.2100
All Tests12.41008.310010.4100

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
H2 embedded
ObjectDB embeddedOpenJPA
H2 embedded
ObjectDB embeddedOpenJPA
H2 embedded
ObjectDB embedded
Basic Person Test27.010027.010027.0100
Element Collection Test30.610030.610030.6100
Inheritance Test27.010027.010027.0100
Indexing Test31.610032.110031.9100
Graph (Binary Tree) Test28.510021.410024.9100
Multithreading Test33.991.19.222.021.556.6
All Tests29.898.524.587.027.292.8

The results above show that in general ObjectDB embedded is much more efficient than OpenJPA with H2 embedded in using disk space. Comparing the normalized score of OpenJPA 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 OpenJPA with H2 embedded.

A large gap has been detected when using graphs of objects with large transaction size. Comparing the normalized score of OpenJPA 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 OpenJPA with H2 embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
H2 embedded
ObjectDB embeddedOpenJPA
H2 embedded
ObjectDB embeddedOpenJPA
H2 embedded
ObjectDB embedded
Basic Person Test13.010010.210011.6100
Element Collection Test2.51003.41003.0100
Inheritance Test3.31005.21004.3100
Indexing Test17.510017.710017.6100
Graph (Binary Tree) Test3.097.13.01003.098.5
Multithreading Test20.410012.010016.2100
All Tests10.299.68.81009.599.8

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

A huge performance gap has been detected when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of OpenJPA 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 OpenJPA with H2 embedded.

Other Head to Head DBMS/JPA Comparisons