Compare with

Comparison of OpenJPA with Derby embedded 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 embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
Basic Person Test4.82.62.91.43.92.0
Element Collection Test2.81.01.90.482.40.76
Inheritance Test4.12.52.41.33.31.9
Indexing Test6.14.04.12.55.13.3
Graph (Binary Tree) Test1.51.11.40.991.41.1
Multithreading Test8.76.23.32.56.04.4
All Tests4.72.92.71.53.72.2

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
 OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
Basic Person Test14.80.9622.69.318.75.1
Element Collection Test0.00310.182.30.771.20.47
Inheritance Test0.0150.557.08.53.54.5
Indexing Test11.70.8226.59.719.15.3
Graph (Binary Tree) Test0.932.11.23.51.12.8
Multithreading Test25.20.2728.67.826.94.0
All Tests8.80.8114.76.611.73.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
 OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
Basic Person Test49.77.29.92.229.84.7
Element Collection Test2.75.89.60.276.13.1
Inheritance Test2.32.91.31.71.82.3
Indexing Test7.00.008417.12.512.11.2
Multithreading Test40.9failed11.7failed26.3failed
All Tests20.54.09.91.715.22.8

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
 OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
Basic Person Test5.60.615.21.15.40.88
Element Collection Test0.00900.312.20.441.10.38
Inheritance Test0.0450.514.61.82.31.1
Indexing Test6.10.688.72.27.41.5
Graph (Binary Tree) Test1.60.910.910.471.30.69
Multithreading Test18.30.644.5failed11.40.64
All Tests5.30.614.41.24.80.88

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
 OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
Basic Person Test4.20.704.51.34.31.0
Element Collection Test0.00710.171.60.400.800.29
Inheritance Test0.0350.413.01.31.50.87
Indexing Test5.31.73.61.94.41.8
Graph (Binary Tree) Test0.800.490.930.460.860.47
Multithreading Test5.7failed6.2failed6.0failed
All Tests2.70.693.31.13.00.89

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
 OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
OpenJPA
Derby embedded
DataNucleus
MySQL server
Basic Person Test15.82.49.03.112.42.7
Element Collection Test1.11.53.50.472.30.99
Inheritance Test1.31.43.72.92.52.1
Indexing Test7.21.412.03.89.62.6
Graph (Binary Tree) Test1.21.21.11.41.21.3
Multithreading Test19.82.410.95.115.33.5
All Tests8.01.76.92.67.42.1

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