Compare with

Comparison of OpenJPA with MySQL server 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
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
Basic Person Test0.150.152.10.561.10.35
Element Collection Testfailed0.161.30.321.30.24
Inheritance Test0.150.202.20.561.20.38
Indexing Test0.230.273.00.801.60.53
Graph (Binary Tree) Testfailed0.33failed0.40failed0.37
Multithreading Testfailed0.715.31.65.31.1
All Tests0.180.302.80.701.80.50

OpenJPA with MySQL server has failed in 4 tests (see exceptions).

The results above show that in general OpenJPA with MySQL server is much more efficient than DataNucleus with MySQL server in persisting JPA entity objects to the database. Comparing the normalized speed of DataNucleus with MySQL database server (0.50) to the normalized speed of OpenJPA with MySQL database server (1.8) reveals that in these tests, OpenJPA with MySQL server is 3.6 times faster than DataNucleus with MySQL server.

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.32) to the normalized speed of OpenJPA with MySQL database server (1.3) reveals that in that case, OpenJPA with MySQL server is 4.1 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
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
Basic Person Testfailed1.619.611.619.66.6
Element Collection Testfailed0.331.20.621.20.48
Inheritance Testfailed1.717.111.617.16.6
Indexing Testfailed1.619.211.619.26.6
Graph (Binary Tree) Testfailed0.80failed1.3failed1.1
Multithreading Testfailed3.932.413.632.48.8
All Testsfailed1.617.98.417.95.0

OpenJPA with MySQL server has failed in 7 tests (see exceptions).

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
Basic Person Testfailed7.32.72.22.74.8
Element Collection Testfailed7.71.30.181.33.9
Inheritance Testfailed7.41.22.61.25.0
Indexing Testfailed0.00945.62.25.61.1
Multithreading Testfailedfailedfailedfailedfailedfailed
All Testsfailed5.62.71.82.73.7

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
Basic Person Teststopped0.173.40.653.40.41
Element Collection Testfailed0.171.60.411.60.29
Inheritance Testfailed0.111.40.291.40.20
Indexing Testfailed0.203.80.743.80.47
Graph (Binary Tree) Testfailed0.27failed0.26failed0.26
Multithreading Testfailedfailed8.9failed8.9failed
All Tests0.00000.183.80.473.80.33

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
Basic Person Teststopped0.141.91.71.90.92
Element Collection Testfailed0.120.610.430.610.27
Inheritance Testfailed0.152.01.82.00.98
Indexing Testfailed0.202.62.32.61.3
Graph (Binary Tree) Testfailed0.51failed0.65failed0.58
Multithreading Testfailedstopped7.1failed7.10.0000
All Tests0.00000.222.81.42.80.80

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
OpenJPA
MySQL server
DataNucleus
MySQL server
Basic Person Test0.151.96.03.35.02.6
Element Collection Testfailed1.71.20.391.21.0
Inheritance Test0.151.94.83.44.02.6
Indexing Test0.230.456.83.55.72.0
Graph (Binary Tree) Testfailed0.48failed0.66failed0.57
Multithreading Testfailed2.313.47.613.45.0
All Tests0.181.46.12.75.52.1

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

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.39) to the normalized speed of OpenJPA with MySQL database server (1.2) reveals that in that case, OpenJPA with MySQL server is 3.1 times faster than DataNucleus with MySQL server.

On the other hand, OpenJPA with MySQL server is slower, for instance, when using simple basic entities with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with MySQL database server (0.15) to the normalized speed of DataNucleus with MySQL database server (1.9) reveals that in that case, OpenJPA with MySQL server is 12.7 times slower than DataNucleus with MySQL server.

Other Head to Head DBMS/JPA Comparisons