Compare with

Comparison of OpenJPA with H2 server vs DataNucleus 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
 OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
Basic Person Test3.72.82.22.32.92.6
Element Collection Test2.60.711.50.352.10.53
Inheritance Test4.52.72.02.03.22.3
Indexing Test7.34.53.64.05.44.3
Graph (Binary Tree) Test1.10.620.840.530.970.57
Multithreading Test7.74.94.23.45.94.1
All Tests4.52.72.42.13.42.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
 OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
Basic Person Test2.90.567.66.35.23.4
Element Collection Test0.00220.361.90.930.930.64
Inheritance Test0.0130.454.06.82.03.6
Indexing Test4.10.508.87.16.53.8
Graph (Binary Tree) Test0.380.220.496.60.443.4
Multithreading Test5.91.214.010.010.05.6
All Tests2.20.556.16.34.23.4

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
 OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
Basic Person Test3.737.71.03.62.420.7
Element Collection Test2.025.91.21.41.613.6
Inheritance Test2.86.51.11.82.04.2
Indexing Test3.80.0307.54.95.72.5
Multithreading Test0.98failed1.0failed1.0failed
All Tests2.717.52.42.92.510.2

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
 OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
Basic Person Test3.01.12.00.852.50.99
Element Collection Test0.00780.811.90.620.940.71
Inheritance Test0.0341.22.81.31.41.2
Indexing Test2.81.23.21.53.01.3
Graph (Binary Tree) Test0.790.290.430.410.610.35
Multithreading Test7.0failed2.5failed4.8failed
All Tests2.30.932.10.922.20.92

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
 OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
Basic Person Test3.21.32.21.32.71.3
Element Collection Test0.00600.610.880.330.440.47
Inheritance Test0.0301.03.11.31.61.2
Indexing Test6.52.33.61.95.12.1
Graph (Binary Tree) Test0.730.260.750.460.740.36
Multithreading Test7.6failed5.2failed6.4failed
All Tests3.01.12.61.12.81.1

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
 OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
OpenJPA
H2 server
DataNucleus
Derby server
Basic Person Test3.38.73.02.93.15.8
Element Collection Test0.935.71.50.721.23.2
Inheritance Test1.52.42.62.62.02.5
Indexing Test4.91.75.43.95.12.8
Graph (Binary Tree) Test0.750.350.632.00.691.2
Multithreading Test5.93.05.46.75.64.9
All Tests2.93.83.22.83.03.3

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