Compare with

Comparison of OpenJPA with Derby server vs DataNucleus with MySQL 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
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
Basic Person Test3.12.62.71.42.92.0
Element Collection Test2.01.01.70.481.80.76
Inheritance Test3.02.52.31.32.61.9
Indexing Test4.74.04.12.54.43.3
Graph (Binary Tree) Test0.711.10.640.990.671.1
Multithreading Test6.06.23.82.54.94.4
All Tests3.32.92.51.52.92.2

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
 OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
Basic Person Test0.780.9611.69.36.25.1
Element Collection Test0.00240.181.10.770.540.47
Inheritance Test0.0140.555.08.52.54.5
Indexing Test0.620.8213.09.76.85.3
Graph (Binary Tree) Test0.0652.10.393.50.232.8
Multithreading Test1.60.2719.07.810.34.0
All Tests0.510.818.46.64.43.7

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
 OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
Basic Person Test29.27.25.52.217.34.7
Element Collection Test2.25.81.40.271.83.1
Inheritance Test2.22.91.01.71.62.3
Indexing Test2.20.008411.72.57.01.2
Multithreading Test35.5failed8.3failed21.9failed
All Tests14.34.05.61.79.92.8

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
 OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
Basic Person Test1.50.614.01.12.80.88
Element Collection Test0.00810.311.90.440.940.38
Inheritance Test0.0430.513.81.81.91.1
Indexing Test1.80.686.82.24.31.5
Graph (Binary Tree) Test0.160.910.270.470.220.69
Multithreading Test6.90.645.0failed5.90.64
All Tests1.70.613.61.22.70.88

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
 OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
Basic Person Test1.40.703.71.32.51.0
Element Collection Test0.00820.171.40.400.710.29
Inheritance Test0.0350.412.51.31.30.87
Indexing Test2.31.73.51.92.91.8
Graph (Binary Tree) Test0.130.490.350.460.240.47
Multithreading Test3.6failed4.0failed3.8failed
All Tests1.30.692.61.11.90.89

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
 OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
OpenJPA
Derby server
DataNucleus
MySQL server
Basic Person Test7.22.45.53.16.42.7
Element Collection Test0.841.51.50.471.20.99
Inheritance Test1.11.42.92.92.02.1
Indexing Test2.31.47.83.85.12.6
Graph (Binary Tree) Test0.271.20.411.40.341.3
Multithreading Test10.72.48.05.19.43.5
All Tests3.91.74.52.64.22.1

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