Compare with

Comparison of DataNucleus with H2 server vs OpenJPA with Derby 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
 DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
Basic Person Test3.43.12.22.72.82.9
Element Collection Test1.22.00.641.70.921.8
Inheritance Test3.03.01.92.32.42.6
Indexing Test5.34.73.54.14.44.4
Graph (Binary Tree) Test2.10.711.30.641.70.67
Multithreading Test10.06.04.33.87.24.9
All Tests4.23.32.32.53.22.9

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
 DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
Basic Person Test2.50.785.211.63.96.2
Element Collection Test0.560.00241.11.10.820.54
Inheritance Test2.20.0146.15.04.22.5
Indexing Test2.10.627.713.04.96.8
Graph (Binary Tree) Test5.70.0658.90.397.30.23
Multithreading Test2.31.68.719.05.510.3
All Tests2.50.516.38.44.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
 DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
Basic Person Test4.129.21.35.52.717.3
Element Collection Test4.02.20.491.42.31.8
Inheritance Test2.92.21.51.02.21.6
Indexing Test0.00362.21.511.70.757.0
Multithreading Test1.335.5failed8.31.321.9
All Tests2.514.31.25.61.99.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
 DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
Basic Person Test2.51.51.44.01.92.8
Element Collection Test2.00.00811.01.91.50.94
Inheritance Test2.40.0432.33.82.31.9
Indexing Test2.71.83.06.82.94.3
Graph (Binary Tree) Test1.80.160.600.271.20.22
Multithreading Testfailed6.9failed5.0failed5.9
All Tests2.31.71.73.62.02.7

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
 DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
Basic Person Test3.41.41.33.72.32.5
Element Collection Test1.50.00820.681.41.10.71
Inheritance Test2.70.0351.32.52.01.3
Indexing Test5.72.31.93.53.82.9
Graph (Binary Tree) Test1.50.131.20.351.30.24
Multithreading Testfailed3.65.14.05.13.8
All Tests3.01.31.92.62.41.9

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
 DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
DataNucleus
H2 server
OpenJPA
Derby server
Basic Person Test3.27.22.35.52.76.4
Element Collection Test1.90.840.781.51.31.2
Inheritance Test2.61.12.62.92.62.0
Indexing Test3.22.33.57.83.35.1
Graph (Binary Tree) Test2.80.273.00.412.90.34
Multithreading Test4.510.76.08.05.39.4
All Tests2.93.92.84.52.94.2

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