Compare with

Comparison of EclipseLink with H2 embedded 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
 EclipseLink
H2 embedded
DataNucleus
MySQL server
EclipseLink
H2 embedded
DataNucleus
MySQL server
EclipseLink
H2 embedded
DataNucleus
MySQL server
Basic Person Test25.12.68.91.417.02.0
Element Collection Test20.41.08.00.4814.20.76
Inheritance Test28.72.58.71.318.71.9
Indexing Test37.64.014.02.525.83.3
Graph (Binary Tree) Test17.71.114.70.9916.21.1
Multithreading Test30.36.211.42.520.84.4
All Tests26.62.910.91.518.82.2

The results above show that in general EclipseLink with H2 embedded 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 (2.2) to the normalized speed of EclipseLink with H2 embedded database (18.8) reveals that in these tests, EclipseLink with H2 embedded is 8.5 times faster than DataNucleus with MySQL server.

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of DataNucleus with MySQL database server (1.0) to the normalized speed of EclipseLink with H2 embedded database (20.4) reveals that in that case, EclipseLink with H2 embedded is 20.4 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
 EclipseLink
H2 embedded
DataNucleus
MySQL server
EclipseLink
H2 embedded
DataNucleus
MySQL server
EclipseLink
H2 embedded
DataNucleus
MySQL server
Basic Person Test30.40.9629.19.329.75.1
Element Collection Test19.60.1827.60.7723.60.47
Inheritance Test33.80.5539.88.536.84.5
Indexing Test22.20.8241.39.731.85.3
Graph (Binary Tree) Test16.02.120.03.518.02.8
Multithreading Test33.70.2729.07.831.44.0
All Tests25.90.8131.16.628.53.7

The results above show that in general EclipseLink with H2 embedded is much more efficient than DataNucleus with MySQL server in retrieving JPA entity objects from the database. Comparing the normalized speed of DataNucleus with MySQL database server (3.7) to the normalized speed of EclipseLink with H2 embedded database (28.5) reveals that in these tests, EclipseLink with H2 embedded is 7.7 times faster than DataNucleus with MySQL server.

A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of DataNucleus with MySQL database server (0.27) to the normalized speed of EclipseLink with H2 embedded database (33.7) reveals that in that case, EclipseLink with H2 embedded is 125 times faster than DataNucleus with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
DataNucleus
MySQL server
EclipseLink
H2 embedded
DataNucleus
MySQL server
EclipseLink
H2 embedded
DataNucleus
MySQL server
Basic Person Test4.47.21.42.22.94.7
Element Collection Test4.15.82.40.273.23.1
Inheritance Test3.42.92.01.72.72.3
Indexing Test13.00.008422.82.517.91.2
Multithreading Test1.0failed0.67failed0.85failed
All Tests5.24.05.91.75.52.8

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
DataNucleus
MySQL server
EclipseLink
H2 embedded
DataNucleus
MySQL server
EclipseLink
H2 embedded
DataNucleus
MySQL server
Basic Person Test16.60.617.61.112.10.88
Element Collection Test15.30.3110.50.4412.90.38
Inheritance Test15.70.519.81.812.71.1
Indexing Test12.10.689.92.211.01.5
Graph (Binary Tree) Test13.70.917.00.4710.30.69
Multithreading Test20.90.644.2failed12.60.64
All Tests15.70.618.21.212.00.88

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

The results above show that in general EclipseLink with H2 embedded is much more efficient than DataNucleus with MySQL server in updating JPA entity objects in the database. Comparing the normalized speed of DataNucleus with MySQL database server (0.88) to the normalized speed of EclipseLink with H2 embedded database (12.0) reveals that in these tests, EclipseLink with H2 embedded is 13.6 times faster than DataNucleus with MySQL server.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
DataNucleus
MySQL server
EclipseLink
H2 embedded
DataNucleus
MySQL server
EclipseLink
H2 embedded
DataNucleus
MySQL server
Basic Person Test35.10.7019.61.327.41.0
Element Collection Test19.30.178.50.4013.90.29
Inheritance Test36.00.4114.01.325.00.87
Indexing Test42.51.719.21.930.91.8
Graph (Binary Tree) Test12.20.4914.40.4613.30.47
Multithreading Test54.4failed25.8failed40.1failed
All Tests33.30.6916.91.125.10.89

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

The results above show that in general EclipseLink with H2 embedded is much more efficient than DataNucleus with MySQL server in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with MySQL database server (0.89) to the normalized speed of EclipseLink with H2 embedded database (25.1) reveals that in these tests, EclipseLink with H2 embedded is 28.2 times faster than DataNucleus with MySQL server.

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
DataNucleus
MySQL server
EclipseLink
H2 embedded
DataNucleus
MySQL server
EclipseLink
H2 embedded
DataNucleus
MySQL server
Basic Person Test22.32.413.33.117.82.7
Element Collection Test15.71.511.40.4713.60.99
Inheritance Test23.51.414.92.919.22.1
Indexing Test25.51.421.53.823.52.6
Graph (Binary Tree) Test14.91.214.01.414.51.3
Multithreading Test28.12.414.25.121.13.5
All Tests21.91.714.92.618.42.1

The results above show that in general EclipseLink with H2 embedded is much 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 EclipseLink with H2 embedded database (18.4) reveals that in these tests, EclipseLink with H2 embedded is 8.8 times faster than DataNucleus with MySQL server.

A huge 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.47) to the normalized speed of EclipseLink with H2 embedded database (11.4) reveals that in that case, EclipseLink with H2 embedded is 24.3 times faster than DataNucleus with MySQL server.

Other Head to Head DBMS/JPA Comparisons