Compare with

Comparison of DataNucleus with H2 server 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
H2 server
OpenJPA
MySQL server
DataNucleus
H2 server
OpenJPA
MySQL server
DataNucleus
H2 server
OpenJPA
MySQL server
Basic Person Test3.43.92.21.62.82.7
Element Collection Test1.21.60.640.680.921.1
Inheritance Test3.03.61.91.42.42.5
Indexing Test5.35.63.52.44.44.0
Graph (Binary Tree) Test2.10.681.30.571.70.63
Multithreading Test10.07.24.32.77.24.9
All Tests4.23.72.31.53.22.6

The results above show that in general DataNucleus with H2 server is slightly 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 small transaction size. Comparing the normalized speed of OpenJPA with MySQL database server (0.68) to the normalized speed of DataNucleus with H2 database server (2.1) reveals that in that case, DataNucleus with H2 server is 3.1 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
H2 server
OpenJPA
MySQL server
DataNucleus
H2 server
OpenJPA
MySQL server
DataNucleus
H2 server
OpenJPA
MySQL server
Basic Person Test2.53.25.222.73.912.9
Element Collection Test0.560.00381.12.90.821.4
Inheritance Test2.20.0176.16.94.23.4
Indexing Test2.12.47.723.44.912.9
Graph (Binary Tree) Test5.70.278.90.357.30.31
Multithreading Test2.30.148.718.15.59.1
All Tests2.51.06.312.44.46.7

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

A large performance gap has been detected when using simple basic entities with large retrieval size. Comparing the normalized speed of DataNucleus with H2 database server (5.2) to the normalized speed of OpenJPA with MySQL database server (22.7) reveals that in that case, OpenJPA with MySQL server is 4.4 times faster than DataNucleus with H2 server.

On the other hand, OpenJPA with MySQL server is slower, for instance, 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 H2 database server (0.56) reveals that in that case, OpenJPA with MySQL server is 147 times slower than DataNucleus with H2 server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 server
OpenJPA
MySQL server
DataNucleus
H2 server
OpenJPA
MySQL server
DataNucleus
H2 server
OpenJPA
MySQL server
Basic Person Test4.19.31.32.22.75.8
Element Collection Test4.04.80.491.12.32.9
Inheritance Test2.91.51.50.902.21.2
Indexing Test0.00360.311.52.10.751.2
Multithreading Test1.31.9failed0.991.31.4
All Tests2.53.61.21.51.92.5

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

The results above show that in general OpenJPA with MySQL server is more efficient than DataNucleus with H2 server in executing the tested JPA queries.

A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with H2 database server (0.0036) to the normalized speed of OpenJPA with MySQL database server (0.31) reveals that in that case, OpenJPA with MySQL server is 86.1 times faster than DataNucleus with H2 server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 server
OpenJPA
MySQL server
DataNucleus
H2 server
OpenJPA
MySQL server
DataNucleus
H2 server
OpenJPA
MySQL server
Basic Person Test2.50.741.41.61.91.2
Element Collection Test2.00.0141.01.71.50.87
Inheritance Test2.40.0482.32.02.31.0
Indexing Test2.70.743.03.02.91.9
Graph (Binary Tree) Test1.80.450.600.251.20.35
Multithreading Testfailed0.55failed2.9failed1.7
All Tests2.30.421.71.92.01.2

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

The results above show that in general DataNucleus with H2 server is more efficient than OpenJPA with MySQL server in updating JPA entity objects in the database.

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 H2 database server (2.0) reveals that in that case, DataNucleus with H2 server is 143 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
H2 server
OpenJPA
MySQL server
DataNucleus
H2 server
OpenJPA
MySQL server
DataNucleus
H2 server
OpenJPA
MySQL server
Basic Person Test3.40.981.31.72.31.4
Element Collection Test1.50.00990.680.651.10.33
Inheritance Test2.70.0331.31.52.00.75
Indexing Test5.70.641.92.03.81.3
Graph (Binary Tree) Test1.50.411.20.431.30.42
Multithreading Testfailed0.275.12.95.11.6
All Tests3.00.391.91.52.40.96

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

The results above show that in general DataNucleus with H2 server 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 H2 database server (2.4) reveals that in these tests, DataNucleus with H2 server is 2.5 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 H2 database server (1.5) reveals that in that case, DataNucleus with H2 server is 152 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
H2 server
OpenJPA
MySQL server
DataNucleus
H2 server
OpenJPA
MySQL server
DataNucleus
H2 server
OpenJPA
MySQL server
Basic Person Test3.23.62.36.02.74.8
Element Collection Test1.91.30.781.41.31.3
Inheritance Test2.61.02.62.52.61.8
Indexing Test3.21.93.56.63.34.3
Graph (Binary Tree) Test2.80.453.00.402.90.43
Multithreading Test4.52.06.05.55.33.8
All Tests2.91.82.83.92.92.8

The results above show that in general DataNucleus with H2 server is slightly more efficient than OpenJPA with MySQL server in performing JPA database operations.

A large 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 H2 database server (3.0) reveals that in that case, DataNucleus with H2 server is 7.5 times faster than OpenJPA with MySQL server.

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

Other Head to Head DBMS/JPA Comparisons