Compare with

Comparison of OpenJPA 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
 OpenJPA
H2 server
ObjectDB embeddedOpenJPA
H2 server
ObjectDB embeddedOpenJPA
H2 server
ObjectDB embedded
Basic Person Test3.71002.21002.9100
Element Collection Test2.61001.51002.1100
Inheritance Test4.51002.01003.2100
Indexing Test7.31003.61005.4100
Graph (Binary Tree) Test1.188.40.841000.9794.2
Multithreading Test7.71004.21005.9100
All Tests4.598.12.41003.499.0

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
H2 server
ObjectDB embeddedOpenJPA
H2 server
ObjectDB embeddedOpenJPA
H2 server
ObjectDB embedded
Basic Person Test2.91007.61005.2100
Element Collection Test0.00221001.91000.93100
Inheritance Test0.0131004.01002.0100
Indexing Test4.11008.81006.5100
Graph (Binary Tree) Test0.381000.491000.44100
Multithreading Test5.910014.010010.0100
All Tests2.21006.11004.2100

The results above show that in general ObjectDB embedded is much more efficient than OpenJPA with H2 server in retrieving JPA entity objects from the database. Comparing the normalized speed of OpenJPA 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 OpenJPA with H2 server.

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
H2 server
ObjectDB embeddedOpenJPA
H2 server
ObjectDB embeddedOpenJPA
H2 server
ObjectDB embedded
Basic Person Test3.71001.01002.4100
Element Collection Test2.01001.21001.6100
Inheritance Test2.81001.11002.0100
Indexing Test3.81007.51005.7100
Multithreading Test0.981001.01001.0100
All Tests2.71002.41002.5100

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
H2 server
ObjectDB embeddedOpenJPA
H2 server
ObjectDB embeddedOpenJPA
H2 server
ObjectDB embedded
Basic Person Test3.01002.01002.5100
Element Collection Test0.00781001.91000.94100
Inheritance Test0.0341002.81001.4100
Indexing Test2.81003.21003.0100
Graph (Binary Tree) Test0.791000.431000.61100
Multithreading Test7.01002.51004.8100
All Tests2.31002.11002.2100

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
H2 server
ObjectDB embeddedOpenJPA
H2 server
ObjectDB embeddedOpenJPA
H2 server
ObjectDB embedded
Basic Person Test3.21002.21002.7100
Element Collection Test0.00601000.881000.44100
Inheritance Test0.0301003.11001.6100
Indexing Test6.51003.61005.1100
Graph (Binary Tree) Test0.731000.751000.74100
Multithreading Test7.61005.21006.4100
All Tests3.01002.61002.8100

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

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
H2 server
ObjectDB embeddedOpenJPA
H2 server
ObjectDB embeddedOpenJPA
H2 server
ObjectDB embedded
Basic Person Test3.31003.01003.1100
Element Collection Test0.931001.51001.2100
Inheritance Test1.51002.61002.0100
Indexing Test4.91005.41005.1100
Graph (Binary Tree) Test0.7597.10.631000.6998.5
Multithreading Test5.91005.41005.6100
All Tests2.999.63.21003.099.8

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

A huge performance gap has been detected when using graphs of objects with large transaction/retrieval size. Comparing the normalized speed of OpenJPA 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 OpenJPA with H2 server.

Other Head to Head DBMS/JPA Comparisons