Compare with

Comparison of OpenJPA with H2 embedded vs ObjectDB 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
 OpenJPA
H2 embedded
ObjectDB serverOpenJPA
H2 embedded
ObjectDB serverOpenJPA
H2 embedded
ObjectDB server
Basic Person Test17.135.25.874.111.554.7
Element Collection Test10.938.24.957.87.948.0
Inheritance Test14.332.75.972.810.152.7
Indexing Test24.449.913.790.119.170.0
Graph (Binary Tree) Test6.81006.789.26.794.6
Multithreading Test34.276.610.299.422.288.0
All Tests17.955.47.980.612.968.0

The results above show that in general ObjectDB server 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 database server (68.0) reveals that in these tests, ObjectDB server is 5.3 times faster than OpenJPA with H2 embedded.

A huge performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of OpenJPA with H2 embedded database (6.8) to the normalized speed of ObjectDB database server (100) reveals that in that case, ObjectDB server is 14.7 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 serverOpenJPA
H2 embedded
ObjectDB serverOpenJPA
H2 embedded
ObjectDB server
Basic Person Test14.615.727.245.420.930.5
Element Collection Test0.004619.94.349.22.134.6
Inheritance Test0.01113.27.449.43.731.3
Indexing Test17.014.035.059.526.036.8
Graph (Binary Tree) Test1.019.91.424.71.222.3
Multithreading Test18.719.727.660.223.140.0
All Tests8.617.117.148.112.832.6

The results above show that in general ObjectDB server is 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 database server (32.6) reveals that in these tests, ObjectDB server is 2.5 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 database server (19.9) reveals that in that case, ObjectDB server is 4,326 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 serverOpenJPA
H2 embedded
ObjectDB serverOpenJPA
H2 embedded
ObjectDB server
Basic Person Test5.038.81.125.93.132.4
Element Collection Test1.739.51.333.11.536.3
Inheritance Test2.234.81.234.01.734.4
Indexing Test13.814.523.253.318.533.9
Multithreading Test1.450.80.6052.10.9951.5
All Tests4.835.75.539.75.137.7

The results above show that in general ObjectDB server 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 database server (37.7) reveals that in these tests, ObjectDB server is 7.4 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 database server (52.1) reveals that in that case, ObjectDB server is 86.8 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 serverOpenJPA
H2 embedded
ObjectDB serverOpenJPA
H2 embedded
ObjectDB server
Basic Person Test10.018.36.040.98.029.6
Element Collection Test0.01121.13.853.71.937.4
Inheritance Test0.04619.95.051.92.535.9
Indexing Test8.917.97.052.18.035.0
Graph (Binary Tree) Test2.442.61.324.11.933.3
Multithreading Test16.668.64.368.710.468.6
All Tests6.331.44.648.65.440.0

The results above show that in general ObjectDB server 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 database server (40.0) reveals that in these tests, ObjectDB server is 7.4 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 database server (21.1) reveals that in that case, ObjectDB server is 1,918 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 serverOpenJPA
H2 embedded
ObjectDB serverOpenJPA
H2 embedded
ObjectDB server
Basic Person Test18.320.211.167.714.744.0
Element Collection Test0.01222.92.957.61.440.2
Inheritance Test0.03023.16.661.63.342.3
Indexing Test23.234.99.755.916.445.4
Graph (Binary Tree) Test1.819.32.427.92.123.6
Multithreading Test31.238.517.350.524.244.5
All Tests12.426.58.353.510.440.0

The results above show that in general ObjectDB server 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 database server (40.0) reveals that in these tests, ObjectDB server is 3.8 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 database server (22.9) reveals that in that case, ObjectDB server is 1,908 times faster 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 serverOpenJPA
H2 embedded
ObjectDB serverOpenJPA
H2 embedded
ObjectDB server
Basic Person Test13.025.610.250.811.638.2
Element Collection Test2.528.33.450.33.039.3
Inheritance Test3.324.75.253.94.339.3
Indexing Test17.526.217.762.217.644.2
Graph (Binary Tree) Test3.045.43.041.53.043.5
Multithreading Test20.450.812.066.216.258.5
All Tests10.233.18.854.69.543.9

The results above show that in general ObjectDB server 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 database server (43.9) reveals that in these tests, ObjectDB server is 4.6 times faster than OpenJPA with H2 embedded.

A huge performance gap has been detected when using graphs of objects with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with H2 embedded database (3.0) to the normalized speed of ObjectDB database server (45.4) reveals that in that case, ObjectDB server is 15.1 times faster than OpenJPA with H2 embedded.

Other Head to Head DBMS/JPA Comparisons