Compare with

Comparison of DataNucleus with Derby server vs OpenJPA 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
 DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
Basic Person Test2.83.72.32.22.62.9
Element Collection Test0.712.60.351.50.532.1
Inheritance Test2.74.52.02.02.33.2
Indexing Test4.57.34.03.64.35.4
Graph (Binary Tree) Test0.621.10.530.840.570.97
Multithreading Test4.97.73.44.24.15.9
All Tests2.74.52.12.42.43.4

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

A large performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of DataNucleus with Derby database server (0.35) to the normalized speed of OpenJPA with H2 database server (1.5) reveals that in that case, OpenJPA with H2 server is 4.3 times faster than DataNucleus with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
Basic Person Test0.562.96.37.63.45.2
Element Collection Test0.360.00220.931.90.640.93
Inheritance Test0.450.0136.84.03.62.0
Indexing Test0.504.17.18.83.86.5
Graph (Binary Tree) Test0.220.386.60.493.40.44
Multithreading Test1.25.910.014.05.610.0
All Tests0.552.26.36.13.44.2

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

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
Basic Person Test37.73.73.61.020.72.4
Element Collection Test25.92.01.41.213.61.6
Inheritance Test6.52.81.81.14.22.0
Indexing Test0.0303.84.97.52.55.7
Multithreading Testfailed0.98failed1.0failed1.0
All Tests17.52.72.92.410.22.5

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

The results above show that in general DataNucleus with Derby server 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 DataNucleus with Derby database server (10.2) reveals that in these tests, DataNucleus with Derby server is 4.1 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 (2.0) to the normalized speed of DataNucleus with Derby database server (25.9) reveals that in that case, DataNucleus with Derby server is 13.0 times faster than OpenJPA with H2 server.

On the other hand, DataNucleus with Derby server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (0.030) to the normalized speed of OpenJPA with H2 database server (3.8) reveals that in that case, DataNucleus with Derby server is 127 times slower than OpenJPA with H2 server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
Basic Person Test1.13.00.852.00.992.5
Element Collection Test0.810.00780.621.90.710.94
Inheritance Test1.20.0341.32.81.21.4
Indexing Test1.22.81.53.21.33.0
Graph (Binary Tree) Test0.290.790.410.430.350.61
Multithreading Testfailed7.0failed2.5failed4.8
All Tests0.932.30.922.10.922.2

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

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

A large performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of DataNucleus with Derby database server (0.62) to the normalized speed of OpenJPA with H2 database server (1.9) reveals that in that case, OpenJPA with H2 server is 3.1 times faster than DataNucleus with Derby server.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
Basic Person Test1.33.21.32.21.32.7
Element Collection Test0.610.00600.330.880.470.44
Inheritance Test1.00.0301.33.11.21.6
Indexing Test2.36.51.93.62.15.1
Graph (Binary Tree) Test0.260.730.460.750.360.74
Multithreading Testfailed7.6failed5.2failed6.4
All Tests1.13.01.12.61.12.8

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

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

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

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
Basic Person Test8.73.32.93.05.83.1
Element Collection Test5.70.930.721.53.21.2
Inheritance Test2.41.52.62.62.52.0
Indexing Test1.74.93.95.42.85.1
Graph (Binary Tree) Test0.350.752.00.631.20.69
Multithreading Test3.05.96.75.44.95.6
All Tests3.82.92.83.23.33.0

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

A large performance gap has been detected when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with H2 database server (0.93) to the normalized speed of DataNucleus with Derby database server (5.7) reveals that in that case, DataNucleus with Derby server is 6.1 times faster than OpenJPA with H2 server.

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

Other Head to Head DBMS/JPA Comparisons