Compare with

Comparison of DataNucleus with H2 embedded vs OpenJPA 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
 DataNucleus
H2 embedded
OpenJPA
H2 embedded
DataNucleus
H2 embedded
OpenJPA
H2 embedded
DataNucleus
H2 embedded
OpenJPA
H2 embedded
Basic Person Test19.217.18.05.813.611.5
Element Collection Test6.610.92.84.94.77.9
Inheritance Test15.614.34.45.910.010.1
Indexing Test24.424.411.813.718.119.1
Graph (Binary Tree) Test9.26.86.26.77.76.7
Multithreading Test34.934.27.110.221.022.2
All Tests18.317.96.77.912.512.9

The results above show that in general OpenJPA with H2 embedded is slightly more efficient than DataNucleus with H2 embedded in persisting JPA entity objects to the database.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
OpenJPA
H2 embedded
DataNucleus
H2 embedded
OpenJPA
H2 embedded
DataNucleus
H2 embedded
OpenJPA
H2 embedded
Basic Person Test13.214.613.527.213.320.9
Element Collection Test6.40.00468.94.37.72.1
Inheritance Test12.20.01112.77.412.43.7
Indexing Test8.117.016.535.012.326.0
Graph (Binary Tree) Test10.61.020.91.415.81.2
Multithreading Test13.318.79.927.611.623.1
All Tests10.68.613.717.112.212.8

The results above show that in general OpenJPA with H2 embedded is slightly more efficient than DataNucleus with H2 embedded in retrieving JPA entity objects from the database.

A large performance gap has been detected when using multithreading with large retrieval size. Comparing the normalized speed of DataNucleus with H2 embedded database (9.9) to the normalized speed of OpenJPA with H2 embedded database (27.6) reveals that in that case, OpenJPA with H2 embedded is 2.8 times faster than DataNucleus with H2 embedded.

On the other hand, OpenJPA with H2 embedded is slower, for instance, 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 DataNucleus with H2 embedded database (6.4) reveals that in that case, OpenJPA with H2 embedded is 1,391 times slower than DataNucleus with H2 embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
OpenJPA
H2 embedded
DataNucleus
H2 embedded
OpenJPA
H2 embedded
DataNucleus
H2 embedded
OpenJPA
H2 embedded
Basic Person Test4.75.01.41.13.13.1
Element Collection Test5.01.72.41.33.71.5
Inheritance Test3.82.21.61.22.71.7
Indexing Test0.004113.81.823.20.9118.5
Multithreading Test1.21.40.790.601.00.99
All Tests3.04.81.65.52.35.1

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

A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with H2 embedded database (0.0041) to the normalized speed of OpenJPA with H2 embedded database (13.8) reveals that in that case, OpenJPA with H2 embedded is 3,366 times faster than DataNucleus with H2 embedded.

On the other hand, OpenJPA with H2 embedded is slower, for instance, when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with H2 embedded database (1.7) to the normalized speed of DataNucleus with H2 embedded database (5.0) reveals that in that case, OpenJPA with H2 embedded is 2.9 times slower than DataNucleus with H2 embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
OpenJPA
H2 embedded
DataNucleus
H2 embedded
OpenJPA
H2 embedded
DataNucleus
H2 embedded
OpenJPA
H2 embedded
Basic Person Test10.010.03.96.06.98.0
Element Collection Test7.60.0113.93.85.81.9
Inheritance Test9.40.0464.45.06.92.5
Indexing Test10.68.95.97.08.28.0
Graph (Binary Tree) Test5.92.43.71.34.81.9
Multithreading Testfailed16.6failed4.3failed10.4
All Tests8.76.34.44.66.55.4

DataNucleus with H2 embedded has failed in 2 tests (see exceptions).

The results above show that in general DataNucleus with H2 embedded is slightly more efficient than OpenJPA with H2 embedded in updating JPA entity objects in the database.

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 DataNucleus with H2 embedded database (7.6) reveals that in that case, DataNucleus with H2 embedded is 691 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
 DataNucleus
H2 embedded
OpenJPA
H2 embedded
DataNucleus
H2 embedded
OpenJPA
H2 embedded
DataNucleus
H2 embedded
OpenJPA
H2 embedded
Basic Person Test4.218.31.311.12.814.7
Element Collection Test4.90.0121.62.93.21.4
Inheritance Test4.00.0301.36.62.73.3
Indexing Test7.523.21.99.74.716.4
Graph (Binary Tree) Test5.61.84.12.44.82.1
Multithreading Testfailed31.2failed17.3failed24.2
All Tests5.212.42.08.33.610.4

DataNucleus with H2 embedded has failed in 2 tests (see exceptions).

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

A large performance gap has been detected when using simple basic entities with large transaction size. Comparing the normalized speed of DataNucleus with H2 embedded database (1.3) to the normalized speed of OpenJPA with H2 embedded database (11.1) reveals that in that case, OpenJPA with H2 embedded is 8.5 times faster than DataNucleus with H2 embedded.

On the other hand, OpenJPA with H2 embedded is slower, for instance, 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 DataNucleus with H2 embedded database (4.9) reveals that in that case, OpenJPA with H2 embedded is 408 times slower than DataNucleus with H2 embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
OpenJPA
H2 embedded
DataNucleus
H2 embedded
OpenJPA
H2 embedded
DataNucleus
H2 embedded
OpenJPA
H2 embedded
Basic Person Test27.027.027.027.027.027.0
Element Collection Test22.430.622.430.622.430.6
Inheritance Test27.027.027.027.027.027.0
Indexing Test31.631.632.132.131.931.9
Graph (Binary Tree) Test20.028.515.021.417.524.9
Multithreading Test33.933.99.29.221.521.5
All Tests27.029.822.124.524.627.2

The results above show that in general OpenJPA with H2 embedded is slightly more efficient than DataNucleus with H2 embedded in using disk space.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
OpenJPA
H2 embedded
DataNucleus
H2 embedded
OpenJPA
H2 embedded
DataNucleus
H2 embedded
OpenJPA
H2 embedded
Basic Person Test10.313.05.610.27.911.6
Element Collection Test6.12.53.93.45.03.0
Inheritance Test9.03.34.95.26.94.3
Indexing Test10.117.57.617.78.917.6
Graph (Binary Tree) Test7.83.08.73.08.33.0
Multithreading Test16.520.45.912.011.216.2
All Tests9.610.26.08.87.89.5

The results above show that in general OpenJPA with H2 embedded is slightly more efficient than DataNucleus with H2 embedded in performing JPA database operations.

A large performance gap has been detected when using database indexes with large transaction/retrieval size. Comparing the normalized speed of DataNucleus with H2 embedded database (7.6) to the normalized speed of OpenJPA with H2 embedded database (17.7) reveals that in that case, OpenJPA with H2 embedded is 2.3 times faster than DataNucleus with H2 embedded.

On the other hand, OpenJPA with H2 embedded is slower, for instance, when using graphs of objects with large transaction/retrieval size. Comparing the normalized speed of OpenJPA with H2 embedded database (3.0) to the normalized speed of DataNucleus with H2 embedded database (8.7) reveals that in that case, OpenJPA with H2 embedded is 2.9 times slower than DataNucleus with H2 embedded.

Other Head to Head DBMS/JPA Comparisons