Compare with

Comparison of DataNucleus with Derby embedded 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
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
Basic Person Test4.63.92.81.63.72.7
Element Collection Test2.41.61.60.682.01.1
Inheritance Test4.63.62.71.43.72.5
Indexing Test7.65.64.82.46.24.0
Graph (Binary Tree) Test1.60.681.40.571.50.63
Multithreading Test8.67.23.32.75.94.9
All Tests4.93.72.81.53.82.6

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

A large performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of OpenJPA with MySQL database server (0.57) to the normalized speed of DataNucleus with Derby embedded database (1.4) reveals that in that case, DataNucleus with Derby embedded is 2.5 times faster than OpenJPA with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
Basic Person Test6.83.214.922.710.912.9
Element Collection Test5.40.00387.62.96.51.4
Inheritance Test8.80.01714.86.911.83.4
Indexing Test9.22.414.123.411.612.9
Graph (Binary Tree) Test9.90.2715.80.3512.90.31
Multithreading Test11.90.1411.518.111.79.1
All Tests8.71.013.112.410.96.7

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

A huge performance gap has been detected 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 Derby embedded database (5.4) reveals that in that case, DataNucleus with Derby embedded is 1,421 times faster than OpenJPA with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
Basic Person Test39.19.37.52.223.35.8
Element Collection Test46.04.86.71.126.32.9
Inheritance Test7.71.53.80.905.71.2
Indexing Test0.0530.318.02.14.01.2
Multithreading Testfailed1.9failed0.99failed1.4
All Tests23.23.66.51.514.82.5

DataNucleus with Derby embedded has failed in 2 tests (see exceptions).

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

A large performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with MySQL database server (4.8) to the normalized speed of DataNucleus with Derby embedded database (46.0) reveals that in that case, DataNucleus with Derby embedded is 9.6 times faster than OpenJPA with MySQL server.

On the other hand, DataNucleus with Derby embedded is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with Derby embedded database (0.053) to the normalized speed of OpenJPA with MySQL database server (0.31) reveals that in that case, DataNucleus with Derby embedded is 5.8 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
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
Basic Person Test4.00.743.81.63.91.2
Element Collection Test3.70.0144.51.74.10.87
Inheritance Test4.40.0484.82.04.61.0
Indexing Test5.20.744.23.04.71.9
Graph (Binary Tree) Test2.70.451.50.252.10.35
Multithreading Testfailed0.55failed2.9failed1.7
All Tests4.00.423.71.93.91.2

DataNucleus with Derby embedded has failed in 2 tests (see exceptions).

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

A huge performance gap has been detected 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 Derby embedded database (3.7) reveals that in that case, DataNucleus with Derby embedded is 264 times faster than OpenJPA with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
Basic Person Test3.50.981.31.72.41.4
Element Collection Test1.90.00991.60.651.70.33
Inheritance Test2.40.0331.31.51.90.75
Indexing Test6.60.641.92.04.31.3
Graph (Binary Tree) Test0.810.410.930.430.870.42
Multithreading Testfailed0.27failed2.9failed1.6
All Tests3.00.391.41.52.20.96

DataNucleus with Derby embedded has failed in 2 tests (see exceptions).

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

A huge performance gap has been detected 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 Derby embedded database (1.9) reveals that in that case, DataNucleus with Derby embedded is 192 times faster than OpenJPA with MySQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
Basic Person Test11.63.66.16.08.84.8
Element Collection Test11.91.34.41.48.11.3
Inheritance Test5.61.05.52.55.51.8
Indexing Test5.71.96.66.66.24.3
Graph (Binary Tree) Test3.70.454.90.404.30.43
Multithreading Test10.32.07.45.58.83.8
All Tests8.01.85.73.96.92.8

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

A huge performance gap has been detected 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 Derby embedded database (4.9) reveals that in that case, DataNucleus with Derby embedded is 12.2 times faster than OpenJPA with MySQL server.

Other Head to Head DBMS/JPA Comparisons