Compare with

Comparison of EclipseLink with MySQL server vs DataNucleus with H2 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
 EclipseLink
MySQL server
DataNucleus
H2 server
EclipseLink
MySQL server
DataNucleus
H2 server
EclipseLink
MySQL server
DataNucleus
H2 server
Basic Person Test3.63.41.52.22.62.8
Element Collection Test1.51.20.690.641.10.92
Inheritance Test3.53.01.41.92.42.4
Indexing Test5.35.32.53.53.94.4
Graph (Binary Tree) Test1.72.11.31.31.51.7
Multithreading Test7.210.02.44.34.87.2
All Tests3.84.21.62.32.73.2

The results above show that in general DataNucleus with H2 server is slightly more efficient than EclipseLink with MySQL server in persisting JPA entity objects to the database.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
MySQL server
DataNucleus
H2 server
EclipseLink
MySQL server
DataNucleus
H2 server
EclipseLink
MySQL server
DataNucleus
H2 server
Basic Person Test0.432.515.55.28.03.9
Element Collection Test0.160.561.41.10.780.82
Inheritance Test0.392.217.66.19.04.2
Indexing Test0.432.116.67.78.54.9
Graph (Binary Tree) Test0.535.70.768.90.657.3
Multithreading Test0.192.311.08.75.65.5
All Tests0.352.510.56.35.44.4

The results above show that in general EclipseLink with MySQL server is slightly 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 EclipseLink with MySQL database server (15.5) reveals that in that case, EclipseLink with MySQL server is 3.0 times faster than DataNucleus with H2 server.

On the other hand, EclipseLink with MySQL server is slower, for instance, when using multithreading with small retrieval size. Comparing the normalized speed of EclipseLink with MySQL database server (0.19) to the normalized speed of DataNucleus with H2 database server (2.3) reveals that in that case, EclipseLink with MySQL server is 12.1 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
 EclipseLink
MySQL server
DataNucleus
H2 server
EclipseLink
MySQL server
DataNucleus
H2 server
EclipseLink
MySQL server
DataNucleus
H2 server
Basic Person Test1.54.10.441.30.952.7
Element Collection Test1.44.00.430.490.922.3
Inheritance Test1.12.90.611.50.862.2
Indexing Test0.260.00360.521.50.390.75
Multithreading Test1.91.30.72failed1.31.3
All Tests1.22.50.541.20.881.9

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 EclipseLink with MySQL server in executing the tested JPA queries. Comparing the normalized speed of EclipseLink with MySQL database server (0.88) to the normalized speed of DataNucleus with H2 database server (1.9) reveals that in these tests, DataNucleus with H2 server is 2.2 times faster than EclipseLink with MySQL server.

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
MySQL server
DataNucleus
H2 server
EclipseLink
MySQL server
DataNucleus
H2 server
EclipseLink
MySQL server
DataNucleus
H2 server
Basic Person Test0.392.51.81.41.11.9
Element Collection Test0.232.01.41.00.831.5
Inheritance Test0.422.42.62.31.52.3
Indexing Test0.462.73.13.01.82.9
Graph (Binary Tree) Test0.671.80.410.600.541.2
Multithreading Test0.48failed2.6failed1.5failed
All Tests0.442.32.01.71.22.0

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 EclipseLink with MySQL server in updating JPA entity objects in the database.

A large performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (0.23) to the normalized speed of DataNucleus with H2 database server (2.0) reveals that in that case, DataNucleus with H2 server is 8.7 times faster than EclipseLink with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
MySQL server
DataNucleus
H2 server
EclipseLink
MySQL server
DataNucleus
H2 server
EclipseLink
MySQL server
DataNucleus
H2 server
Basic Person Test0.353.41.71.31.02.3
Element Collection Test0.111.50.510.680.311.1
Inheritance Test0.292.71.61.30.942.0
Indexing Test0.465.71.91.91.23.8
Graph (Binary Tree) Test0.541.50.491.20.511.3
Multithreading Test0.31failed3.65.11.95.1
All Tests0.343.01.61.90.982.4

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 EclipseLink with MySQL server in deleting JPA entity objects from the database. Comparing the normalized speed of EclipseLink with MySQL database server (0.98) to the normalized speed of DataNucleus with H2 database server (2.4) reveals that in these tests, DataNucleus with H2 server is 2.4 times faster than EclipseLink with MySQL server.

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (0.11) to the normalized speed of DataNucleus with H2 database server (1.5) reveals that in that case, DataNucleus with H2 server is 13.6 times faster than EclipseLink with MySQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
MySQL server
DataNucleus
H2 server
EclipseLink
MySQL server
DataNucleus
H2 server
EclipseLink
MySQL server
DataNucleus
H2 server
Basic Person Test1.33.24.22.32.72.7
Element Collection Test0.691.90.890.780.791.3
Inheritance Test1.12.64.82.62.92.6
Indexing Test1.43.24.93.53.23.3
Graph (Binary Tree) Test0.852.80.733.00.792.9
Multithreading Test2.04.54.06.03.05.3
All Tests1.22.93.32.82.32.9

The results above show that in general DataNucleus with H2 server is slightly more efficient than EclipseLink 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 EclipseLink with MySQL database server (0.73) to the normalized speed of DataNucleus with H2 database server (3.0) reveals that in that case, DataNucleus with H2 server is 4.1 times faster than EclipseLink with MySQL server.

Other Head to Head DBMS/JPA Comparisons