Compare with

Comparison of DataNucleus with MySQL server vs OpenJPA with Derby embedded

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 embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
Basic Person Test2.64.81.42.92.03.9
Element Collection Test1.02.80.481.90.762.4
Inheritance Test2.54.11.32.41.93.3
Indexing Test4.06.12.54.13.35.1
Graph (Binary Tree) Test1.11.50.991.41.11.4
Multithreading Test6.28.72.53.34.46.0
All Tests2.94.71.52.72.23.7

The results above show that in general OpenJPA with Derby embedded 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 embedded database (1.9) reveals that in that case, OpenJPA with Derby embedded is 4.0 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 embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
Basic Person Test0.9614.89.322.65.118.7
Element Collection Test0.180.00310.772.30.471.2
Inheritance Test0.550.0158.57.04.53.5
Indexing Test0.8211.79.726.55.319.1
Graph (Binary Tree) Test2.10.933.51.22.81.1
Multithreading Test0.2725.27.828.64.026.9
All Tests0.818.86.614.73.711.7

The results above show that in general OpenJPA with Derby embedded is much more efficient than DataNucleus with MySQL server in retrieving JPA entity objects from the database. Comparing the normalized speed of DataNucleus with MySQL database server (3.7) to the normalized speed of OpenJPA with Derby embedded database (11.7) reveals that in these tests, OpenJPA with Derby embedded is 3.2 times faster than DataNucleus with MySQL server.

A huge 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 embedded database (25.2) reveals that in that case, OpenJPA with Derby embedded is 93.3 times faster than DataNucleus with MySQL server.

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0031) to the normalized speed of DataNucleus with MySQL database server (0.18) reveals that in that case, OpenJPA with Derby embedded is 58.1 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 embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
Basic Person Test7.249.72.29.94.729.8
Element Collection Test5.82.70.279.63.16.1
Inheritance Test2.92.31.71.32.31.8
Indexing Test0.00847.02.517.11.212.1
Multithreading Testfailed40.9failed11.7failed26.3
All Tests4.020.51.79.92.815.2

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

The results above show that in general OpenJPA with Derby embedded 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 embedded database (15.2) reveals that in these tests, OpenJPA with Derby embedded is 5.4 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 embedded database (7.0) reveals that in that case, OpenJPA with Derby embedded is 833 times faster than DataNucleus with MySQL server.

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (2.7) to the normalized speed of DataNucleus with MySQL database server (5.8) reveals that in that case, OpenJPA with Derby embedded is 2.1 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 embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
Basic Person Test0.615.61.15.20.885.4
Element Collection Test0.310.00900.442.20.381.1
Inheritance Test0.510.0451.84.61.12.3
Indexing Test0.686.12.28.71.57.4
Graph (Binary Tree) Test0.911.60.470.910.691.3
Multithreading Test0.6418.3failed4.50.6411.4
All Tests0.615.31.24.40.884.8

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

The results above show that in general OpenJPA with Derby embedded 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 embedded database (4.8) reveals that in these tests, OpenJPA with Derby embedded is 5.5 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 embedded database (18.3) reveals that in that case, OpenJPA with Derby embedded is 28.6 times faster than DataNucleus with MySQL server.

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0090) to the normalized speed of DataNucleus with MySQL database server (0.31) reveals that in that case, OpenJPA with Derby embedded is 34.4 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 embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
Basic Person Test0.704.21.34.51.04.3
Element Collection Test0.170.00710.401.60.290.80
Inheritance Test0.410.0351.33.00.871.5
Indexing Test1.75.31.93.61.84.4
Graph (Binary Tree) Test0.490.800.460.930.470.86
Multithreading Testfailed5.7failed6.2failed6.0
All Tests0.692.71.13.30.893.0

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

The results above show that in general OpenJPA with Derby embedded is much 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 embedded database (3.0) reveals that in these tests, OpenJPA with Derby embedded is 3.4 times faster than DataNucleus with MySQL server.

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

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0071) to the normalized speed of DataNucleus with MySQL database server (0.17) reveals that in that case, OpenJPA with Derby embedded is 23.9 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 embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
Basic Person Test2.415.83.19.02.712.4
Element Collection Test1.51.10.473.50.992.3
Inheritance Test1.41.32.93.72.12.5
Indexing Test1.47.23.812.02.69.6
Graph (Binary Tree) Test1.21.21.41.11.31.2
Multithreading Test2.419.85.110.93.515.3
All Tests1.78.02.66.92.17.4

The results above show that in general OpenJPA with Derby embedded is much 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 embedded database (7.4) reveals that in these tests, OpenJPA with Derby embedded is 3.5 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 embedded database (19.8) reveals that in that case, OpenJPA with Derby embedded is 8.2 times faster than DataNucleus with MySQL server.

Other Head to Head DBMS/JPA Comparisons