Compare with

Comparison of OpenJPA with Derby server vs DataNucleus with H2 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
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
Basic Person Test3.13.42.72.22.92.8
Element Collection Test2.01.21.70.641.80.92
Inheritance Test3.03.02.31.92.62.4
Indexing Test4.75.34.13.54.44.4
Graph (Binary Tree) Test0.712.10.641.30.671.7
Multithreading Test6.010.03.84.34.97.2
All Tests3.34.22.52.32.93.2

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

A large performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of OpenJPA with Derby database server (0.71) to the normalized speed of DataNucleus with H2 database server (2.1) reveals that in that case, DataNucleus with H2 server is 3.0 times faster than OpenJPA with Derby server.

On the other hand, DataNucleus with H2 server is slower, for instance, when using JPA element collections with large transaction size. Comparing the normalized speed of DataNucleus with H2 database server (0.64) to the normalized speed of OpenJPA with Derby database server (1.7) reveals that in that case, DataNucleus with H2 server is 2.7 times slower than OpenJPA with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
Basic Person Test0.782.511.65.26.23.9
Element Collection Test0.00240.561.11.10.540.82
Inheritance Test0.0142.25.06.12.54.2
Indexing Test0.622.113.07.76.84.9
Graph (Binary Tree) Test0.0655.70.398.90.237.3
Multithreading Test1.62.319.08.710.35.5
All Tests0.512.58.46.34.44.4

The results above show that in general OpenJPA with Derby server is equivalent to DataNucleus with H2 server in retrieving JPA entity objects from the database.

A large performance gap has been detected when using simple basic entities with large retrieval size. Comparing the normalized speed of DataNucleus with H2 database server (5.2) to the normalized speed of OpenJPA with Derby database server (11.6) reveals that in that case, OpenJPA with Derby server is 2.2 times faster than DataNucleus with H2 server.

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
Basic Person Test29.24.15.51.317.32.7
Element Collection Test2.24.01.40.491.82.3
Inheritance Test2.22.91.01.51.62.2
Indexing Test2.20.003611.71.57.00.75
Multithreading Test35.51.38.3failed21.91.3
All Tests14.32.55.61.29.91.9

DataNucleus with H2 server has failed in 1 tests (see exceptions).

The results above show that in general OpenJPA with Derby server is much more efficient than DataNucleus with H2 server in executing the tested JPA queries. Comparing the normalized speed of DataNucleus with H2 database server (1.9) to the normalized speed of OpenJPA with Derby database server (9.9) reveals that in these tests, OpenJPA with Derby server is 5.2 times faster than DataNucleus with H2 server.

A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with H2 database server (0.0036) to the normalized speed of OpenJPA with Derby database server (2.2) reveals that in that case, OpenJPA with Derby server is 611 times faster than DataNucleus with H2 server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
Basic Person Test1.52.54.01.42.81.9
Element Collection Test0.00812.01.91.00.941.5
Inheritance Test0.0432.43.82.31.92.3
Indexing Test1.82.76.83.04.32.9
Graph (Binary Tree) Test0.161.80.270.600.221.2
Multithreading Test6.9failed5.0failed5.9failed
All Tests1.72.33.61.72.72.0

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

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

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

On the other hand, OpenJPA with Derby server is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with Derby database server (0.0081) to the normalized speed of DataNucleus with H2 database server (2.0) reveals that in that case, OpenJPA with Derby server is 247 times slower than DataNucleus with H2 server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
Basic Person Test1.43.43.71.32.52.3
Element Collection Test0.00821.51.40.680.711.1
Inheritance Test0.0352.72.51.31.32.0
Indexing Test2.35.73.51.92.93.8
Graph (Binary Tree) Test0.131.50.351.20.241.3
Multithreading Test3.6failed4.05.13.85.1
All Tests1.33.02.61.91.92.4

DataNucleus with H2 server has failed in 1 tests (see exceptions).

The results above show that in general DataNucleus with H2 server is slightly more efficient than OpenJPA with Derby server in deleting JPA entity objects from 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 Derby database server (0.0082) to the normalized speed of DataNucleus with H2 database server (1.5) reveals that in that case, DataNucleus with H2 server is 183 times faster than OpenJPA with Derby server.

On the other hand, DataNucleus with H2 server is slower, for instance, when using simple basic entities with large transaction size. Comparing the normalized speed of DataNucleus with H2 database server (1.3) to the normalized speed of OpenJPA with Derby database server (3.7) reveals that in that case, DataNucleus with H2 server is 2.8 times slower than OpenJPA with Derby server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
Basic Person Test7.23.25.52.36.42.7
Element Collection Test0.841.91.50.781.21.3
Inheritance Test1.12.62.92.62.02.6
Indexing Test2.33.27.83.55.13.3
Graph (Binary Tree) Test0.272.80.413.00.342.9
Multithreading Test10.74.58.06.09.45.3
All Tests3.92.94.52.84.22.9

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

A large performance gap has been detected when using simple basic entities with large transaction/retrieval size. Comparing the normalized speed of DataNucleus with H2 database server (2.3) to the normalized speed of OpenJPA with Derby database server (5.5) reveals that in that case, OpenJPA with Derby server is 2.4 times faster than DataNucleus with H2 server.

On the other hand, OpenJPA with Derby server is slower, for instance, when using graphs of objects with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with Derby database server (0.27) to the normalized speed of DataNucleus with H2 database server (2.8) reveals that in that case, OpenJPA with Derby server is 10.4 times slower than DataNucleus with H2 server.

Other Head to Head DBMS/JPA Comparisons