Compare with

Comparison of OpenJPA with MySQL server vs DataNucleus 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
 OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
Basic Person Test3.94.61.62.82.73.7
Element Collection Test1.62.40.681.61.12.0
Inheritance Test3.64.61.42.72.53.7
Indexing Test5.67.62.44.84.06.2
Graph (Binary Tree) Test0.681.60.571.40.631.5
Multithreading Test7.28.62.73.34.95.9
All Tests3.74.91.52.82.63.8

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
 OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
Basic Person Test3.26.822.714.912.910.9
Element Collection Test0.00385.42.97.61.46.5
Inheritance Test0.0178.86.914.83.411.8
Indexing Test2.49.223.414.112.911.6
Graph (Binary Tree) Test0.279.90.3515.80.3112.9
Multithreading Test0.1411.918.111.59.111.7
All Tests1.08.712.413.16.710.9

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
 OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
Basic Person Test9.339.12.27.55.823.3
Element Collection Test4.846.01.16.72.926.3
Inheritance Test1.57.70.903.81.25.7
Indexing Test0.310.0532.18.01.24.0
Multithreading Test1.9failed0.99failed1.4failed
All Tests3.623.21.56.52.514.8

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
 OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
Basic Person Test0.744.01.63.81.23.9
Element Collection Test0.0143.71.74.50.874.1
Inheritance Test0.0484.42.04.81.04.6
Indexing Test0.745.23.04.21.94.7
Graph (Binary Tree) Test0.452.70.251.50.352.1
Multithreading Test0.55failed2.9failed1.7failed
All Tests0.424.01.93.71.23.9

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
 OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
Basic Person Test0.983.51.71.31.42.4
Element Collection Test0.00991.90.651.60.331.7
Inheritance Test0.0332.41.51.30.751.9
Indexing Test0.646.62.01.91.34.3
Graph (Binary Tree) Test0.410.810.430.930.420.87
Multithreading Test0.27failed2.9failed1.6failed
All Tests0.393.01.51.40.962.2

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
 OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
OpenJPA
MySQL server
DataNucleus
Derby embedded
Basic Person Test3.611.66.06.14.88.8
Element Collection Test1.311.91.44.41.38.1
Inheritance Test1.05.62.55.51.85.5
Indexing Test1.95.76.66.64.36.2
Graph (Binary Tree) Test0.453.70.404.90.434.3
Multithreading Test2.010.35.57.43.88.8
All Tests1.88.03.95.72.86.9

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