Compare with

Comparison of DataNucleus with MySQL 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
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
Basic Person Test2.63.11.42.72.02.9
Element Collection Test1.02.00.481.70.761.8
Inheritance Test2.53.01.32.31.92.6
Indexing Test4.04.72.54.13.34.4
Graph (Binary Tree) Test1.10.710.990.641.10.67
Multithreading Test6.26.02.53.84.44.9
All Tests2.93.31.52.52.22.9

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
Basic Person Test0.960.789.311.65.16.2
Element Collection Test0.180.00240.771.10.470.54
Inheritance Test0.550.0148.55.04.52.5
Indexing Test0.820.629.713.05.36.8
Graph (Binary Tree) Test2.10.0653.50.392.80.23
Multithreading Test0.271.67.819.04.010.3
All Tests0.810.516.68.43.74.4

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

A large performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of DataNucleus with MySQL database server (0.27) to the normalized speed of OpenJPA with Derby database server (1.6) reveals that in that case, OpenJPA with Derby server is 5.9 times faster than DataNucleus with MySQL 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 MySQL database server (0.18) reveals that in that case, OpenJPA with Derby server is 75.0 times slower than DataNucleus with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
Basic Person Test7.229.22.25.54.717.3
Element Collection Test5.82.20.271.43.11.8
Inheritance Test2.92.21.71.02.31.6
Indexing Test0.00842.22.511.71.27.0
Multithreading Testfailed35.5failed8.3failed21.9
All Tests4.014.31.75.62.89.9

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

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

A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with MySQL database server (0.0084) to the normalized speed of OpenJPA with Derby database server (2.2) reveals that in that case, OpenJPA with Derby server is 262 times faster than DataNucleus with MySQL 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 (2.2) to the normalized speed of DataNucleus with MySQL database server (5.8) reveals that in that case, OpenJPA with Derby server is 2.6 times slower than DataNucleus with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
Basic Person Test0.611.51.14.00.882.8
Element Collection Test0.310.00810.441.90.380.94
Inheritance Test0.510.0431.83.81.11.9
Indexing Test0.681.82.26.81.54.3
Graph (Binary Tree) Test0.910.160.470.270.690.22
Multithreading Test0.646.9failed5.00.645.9
All Tests0.611.71.23.60.882.7

DataNucleus with MySQL 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 MySQL server in updating JPA entity objects in the database. Comparing the normalized speed of DataNucleus with MySQL database server (0.88) to the normalized speed of OpenJPA with Derby database server (2.7) reveals that in these tests, OpenJPA with Derby server is 3.1 times faster than DataNucleus with MySQL server.

A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of DataNucleus with MySQL database server (0.64) to the normalized speed of OpenJPA with Derby database server (6.9) reveals that in that case, OpenJPA with Derby server is 10.8 times faster than DataNucleus with MySQL 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 MySQL database server (0.31) reveals that in that case, OpenJPA with Derby server is 38.3 times slower than DataNucleus with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
Basic Person Test0.701.41.33.71.02.5
Element Collection Test0.170.00820.401.40.290.71
Inheritance Test0.410.0351.32.50.871.3
Indexing Test1.72.31.93.51.82.9
Graph (Binary Tree) Test0.490.130.460.350.470.24
Multithreading Testfailed3.6failed4.0failed3.8
All Tests0.691.31.12.60.891.9

DataNucleus with MySQL 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 MySQL server in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with MySQL database server (0.89) to the normalized speed of OpenJPA with Derby database server (1.9) reveals that in these tests, OpenJPA with Derby server is 2.1 times faster than DataNucleus with MySQL server.

A large performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of DataNucleus with MySQL database server (0.40) to the normalized speed of OpenJPA with Derby database server (1.4) reveals that in that case, OpenJPA with Derby server is 3.5 times faster than DataNucleus with MySQL 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.0082) to the normalized speed of DataNucleus with MySQL database server (0.17) reveals that in that case, OpenJPA with Derby server is 20.7 times slower than DataNucleus with MySQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
Basic Person Test2.47.23.15.52.76.4
Element Collection Test1.50.840.471.50.991.2
Inheritance Test1.41.12.92.92.12.0
Indexing Test1.42.33.87.82.65.1
Graph (Binary Tree) Test1.20.271.40.411.30.34
Multithreading Test2.410.75.18.03.59.4
All Tests1.73.92.64.52.14.2

The results above show that in general OpenJPA with Derby server is more efficient than DataNucleus with MySQL server in performing JPA database operations. Comparing the normalized speed of DataNucleus with MySQL database server (2.1) to the normalized speed of OpenJPA with Derby database server (4.2) reveals that in these tests, OpenJPA with Derby server is 2.0 times faster than DataNucleus with MySQL server.

A large performance gap has been detected when using multithreading with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with MySQL database server (2.4) to the normalized speed of OpenJPA with Derby database server (10.7) reveals that in that case, OpenJPA with Derby server is 4.5 times faster than DataNucleus with MySQL 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 MySQL database server (1.2) reveals that in that case, OpenJPA with Derby server is 4.4 times slower than DataNucleus with MySQL server.

Other Head to Head DBMS/JPA Comparisons