Compare with

Comparison of DataNucleus with MySQL server vs OpenJPA 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
 DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
Basic Person Test2.63.91.41.62.02.7
Element Collection Test1.01.60.480.680.761.1
Inheritance Test2.53.61.31.41.92.5
Indexing Test4.05.62.52.43.34.0
Graph (Binary Tree) Test1.10.680.990.571.10.63
Multithreading Test6.27.22.52.74.44.9
All Tests2.93.71.51.52.22.6

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
Basic Person Test0.963.29.322.75.112.9
Element Collection Test0.180.00380.772.90.471.4
Inheritance Test0.550.0178.56.94.53.4
Indexing Test0.822.49.723.45.312.9
Graph (Binary Tree) Test2.10.273.50.352.80.31
Multithreading Test0.270.147.818.14.09.1
All Tests0.811.06.612.43.76.7

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

A large performance gap has been detected when using JPA element collections with large retrieval size. Comparing the normalized speed of DataNucleus with MySQL database server (0.77) to the normalized speed of OpenJPA with MySQL database server (2.9) reveals that in that case, OpenJPA with MySQL server is 3.8 times faster than DataNucleus with MySQL 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 MySQL database server (0.18) reveals that in that case, OpenJPA with MySQL server is 47.4 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
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
Basic Person Test7.29.32.22.24.75.8
Element Collection Test5.84.80.271.13.12.9
Inheritance Test2.91.51.70.902.31.2
Indexing Test0.00840.312.52.11.21.2
Multithreading Testfailed1.9failed0.99failed1.4
All Tests4.03.61.71.52.82.5

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

The results above show that in general DataNucleus with MySQL server is slightly more efficient than OpenJPA with MySQL server in executing the tested JPA queries.

On the other hand, DataNucleus with MySQL server is slower, for instance, 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 MySQL database server (0.31) reveals that in that case, DataNucleus with MySQL server is 36.9 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
 DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
Basic Person Test0.610.741.11.60.881.2
Element Collection Test0.310.0140.441.70.380.87
Inheritance Test0.510.0481.82.01.11.0
Indexing Test0.680.742.23.01.51.9
Graph (Binary Tree) Test0.910.450.470.250.690.35
Multithreading Test0.640.55failed2.90.641.7
All Tests0.610.421.21.90.881.2

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

The results above show that in general OpenJPA with MySQL server is more efficient than DataNucleus with MySQL 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 MySQL database server (0.44) to the normalized speed of OpenJPA with MySQL database server (1.7) reveals that in that case, OpenJPA with MySQL server is 3.9 times faster than DataNucleus with MySQL 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 MySQL database server (0.31) reveals that in that case, OpenJPA with MySQL server is 22.1 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
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
Basic Person Test0.700.981.31.71.01.4
Element Collection Test0.170.00990.400.650.290.33
Inheritance Test0.410.0331.31.50.870.75
Indexing Test1.70.641.92.01.81.3
Graph (Binary Tree) Test0.490.410.460.430.470.42
Multithreading Testfailed0.27failed2.9failed1.6
All Tests0.690.391.11.50.890.96

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

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

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.0099) to the normalized speed of DataNucleus with MySQL database server (0.17) reveals that in that case, OpenJPA with MySQL server is 17.2 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
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
Basic Person Test2.43.63.16.02.74.8
Element Collection Test1.51.30.471.40.991.3
Inheritance Test1.41.02.92.52.11.8
Indexing Test1.41.93.86.62.64.3
Graph (Binary Tree) Test1.20.451.40.401.30.43
Multithreading Test2.42.05.15.53.53.8
All Tests1.71.82.63.92.12.8

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

A large performance gap has been detected when using JPA element collections with large transaction/retrieval size. Comparing the normalized speed of DataNucleus with MySQL database server (0.47) to the normalized speed of OpenJPA with MySQL database server (1.4) reveals that in that case, OpenJPA with MySQL server is 3.0 times faster than DataNucleus with MySQL server.

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

Other Head to Head DBMS/JPA Comparisons