Compare with

Comparison of OpenJPA with MySQL 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
MySQL server
DataNucleus
Derby server
OpenJPA
MySQL server
DataNucleus
Derby server
OpenJPA
MySQL server
DataNucleus
Derby server
Basic Person Test3.92.81.62.32.72.6
Element Collection Test1.60.710.680.351.10.53
Inheritance Test3.62.71.42.02.52.3
Indexing Test5.64.52.44.04.04.3
Graph (Binary Tree) Test0.680.620.570.530.630.57
Multithreading Test7.24.92.73.44.94.1
All Tests3.72.71.52.12.62.4

The results above show that in general OpenJPA with MySQL server is slightly 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 small transaction size. Comparing the normalized speed of DataNucleus with Derby database server (0.71) to the normalized speed of OpenJPA with MySQL database server (1.6) reveals that in that case, OpenJPA with MySQL server is 2.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
MySQL server
DataNucleus
Derby server
OpenJPA
MySQL server
DataNucleus
Derby server
OpenJPA
MySQL server
DataNucleus
Derby server
Basic Person Test3.20.5622.76.312.93.4
Element Collection Test0.00380.362.90.931.40.64
Inheritance Test0.0170.456.96.83.43.6
Indexing Test2.40.5023.47.112.93.8
Graph (Binary Tree) Test0.270.220.356.60.313.4
Multithreading Test0.141.218.110.09.15.6
All Tests1.00.5512.46.36.73.4

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

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

On the other hand, OpenJPA with MySQL server is slower, for instance, when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with MySQL database server (0.0038) to the normalized speed of DataNucleus with Derby database server (0.36) reveals that in that case, OpenJPA with MySQL server is 94.7 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
MySQL server
DataNucleus
Derby server
OpenJPA
MySQL server
DataNucleus
Derby server
OpenJPA
MySQL server
DataNucleus
Derby server
Basic Person Test9.337.72.23.65.820.7
Element Collection Test4.825.91.11.42.913.6
Inheritance Test1.56.50.901.81.24.2
Indexing Test0.310.0302.14.91.22.5
Multithreading Test1.9failed0.99failed1.4failed
All Tests3.617.51.52.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 MySQL server in executing the tested JPA queries. Comparing the normalized speed of OpenJPA with MySQL 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 MySQL server.

A large performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with MySQL database server (4.8) to the normalized speed of DataNucleus with Derby database server (25.9) reveals that in that case, DataNucleus with Derby server is 5.4 times faster than OpenJPA with MySQL 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 MySQL database server (0.31) reveals that in that case, DataNucleus with Derby server is 10.3 times slower than OpenJPA with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
DataNucleus
Derby server
OpenJPA
MySQL server
DataNucleus
Derby server
OpenJPA
MySQL server
DataNucleus
Derby server
Basic Person Test0.741.11.60.851.20.99
Element Collection Test0.0140.811.70.620.870.71
Inheritance Test0.0481.22.01.31.01.2
Indexing Test0.741.23.01.51.91.3
Graph (Binary Tree) Test0.450.290.250.410.350.35
Multithreading Test0.55failed2.9failed1.7failed
All Tests0.420.931.90.921.20.92

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

The results above show that in general OpenJPA with MySQL server is more efficient than DataNucleus with Derby server in updating JPA entity objects in 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.62) to the normalized speed of OpenJPA with MySQL database server (1.7) reveals that in that case, OpenJPA with MySQL server is 2.7 times faster than DataNucleus with Derby server.

On the other hand, OpenJPA with MySQL server is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with MySQL database server (0.014) to the normalized speed of DataNucleus with Derby database server (0.81) reveals that in that case, OpenJPA with MySQL server is 57.9 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
MySQL server
DataNucleus
Derby server
OpenJPA
MySQL server
DataNucleus
Derby server
OpenJPA
MySQL server
DataNucleus
Derby server
Basic Person Test0.981.31.71.31.41.3
Element Collection Test0.00990.610.650.330.330.47
Inheritance Test0.0331.01.51.30.751.2
Indexing Test0.642.32.01.91.32.1
Graph (Binary Tree) Test0.410.260.430.460.420.36
Multithreading Test0.27failed2.9failed1.6failed
All Tests0.391.11.51.10.961.1

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

The results above show that in general DataNucleus with Derby server is slightly more efficient than OpenJPA with MySQL 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 MySQL database server (0.0099) to the normalized speed of DataNucleus with Derby database server (0.61) reveals that in that case, DataNucleus with Derby server is 61.6 times faster than OpenJPA with MySQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
DataNucleus
Derby server
OpenJPA
MySQL server
DataNucleus
Derby server
OpenJPA
MySQL server
DataNucleus
Derby server
Basic Person Test3.68.76.02.94.85.8
Element Collection Test1.35.71.40.721.33.2
Inheritance Test1.02.42.52.61.82.5
Indexing Test1.91.76.63.94.32.8
Graph (Binary Tree) Test0.450.350.402.00.431.2
Multithreading Test2.03.05.56.73.84.9
All Tests1.83.83.92.82.83.3

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

A large performance gap has been detected when using graphs of objects with large transaction/retrieval size. Comparing the normalized speed of OpenJPA with MySQL database server (0.40) to the normalized speed of DataNucleus with Derby database server (2.0) reveals that in that case, DataNucleus with Derby server is 5.0 times faster than OpenJPA with MySQL server.

On the other hand, DataNucleus with Derby server is slower, for instance, when using simple basic entities with large transaction/retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (2.9) to the normalized speed of OpenJPA with MySQL database server (6.0) reveals that in that case, DataNucleus with Derby server is 2.1 times slower than OpenJPA with MySQL server.

Other Head to Head DBMS/JPA Comparisons