Compare with

Comparison of EclipseLink with MySQL server vs DataNucleus with H2 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
 EclipseLink
MySQL server
DataNucleus
H2 embedded
EclipseLink
MySQL server
DataNucleus
H2 embedded
EclipseLink
MySQL server
DataNucleus
H2 embedded
Basic Person Test3.619.21.58.02.613.6
Element Collection Test1.56.60.692.81.14.7
Inheritance Test3.515.61.44.42.410.0
Indexing Test5.324.42.511.83.918.1
Graph (Binary Tree) Test1.79.21.36.21.57.7
Multithreading Test7.234.92.47.14.821.0
All Tests3.818.31.66.72.712.5

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

A large performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (1.7) to the normalized speed of DataNucleus with H2 embedded database (9.2) reveals that in that case, DataNucleus with H2 embedded is 5.4 times faster than EclipseLink with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
MySQL server
DataNucleus
H2 embedded
EclipseLink
MySQL server
DataNucleus
H2 embedded
EclipseLink
MySQL server
DataNucleus
H2 embedded
Basic Person Test0.4313.215.513.58.013.3
Element Collection Test0.166.41.48.90.787.7
Inheritance Test0.3912.217.612.79.012.4
Indexing Test0.438.116.616.58.512.3
Graph (Binary Tree) Test0.5310.60.7620.90.6515.8
Multithreading Test0.1913.311.09.95.611.6
All Tests0.3510.610.513.75.412.2

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

A huge performance gap has been detected 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 embedded database (13.3) reveals that in that case, DataNucleus with H2 embedded is 70.0 times faster than EclipseLink with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
MySQL server
DataNucleus
H2 embedded
EclipseLink
MySQL server
DataNucleus
H2 embedded
EclipseLink
MySQL server
DataNucleus
H2 embedded
Basic Person Test1.54.70.441.40.953.1
Element Collection Test1.45.00.432.40.923.7
Inheritance Test1.13.80.611.60.862.7
Indexing Test0.260.00410.521.80.390.91
Multithreading Test1.91.20.720.791.31.0
All Tests1.23.00.541.60.882.3

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

A large performance gap has been detected when using JPA element collections with large retrieval size. Comparing the normalized speed of EclipseLink with MySQL database server (0.43) to the normalized speed of DataNucleus with H2 embedded database (2.4) reveals that in that case, DataNucleus with H2 embedded is 5.6 times faster than EclipseLink with MySQL server.

On the other hand, DataNucleus with H2 embedded is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with H2 embedded database (0.0041) to the normalized speed of EclipseLink with MySQL database server (0.26) reveals that in that case, DataNucleus with H2 embedded is 63.4 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 embedded
EclipseLink
MySQL server
DataNucleus
H2 embedded
EclipseLink
MySQL server
DataNucleus
H2 embedded
Basic Person Test0.3910.01.83.91.16.9
Element Collection Test0.237.61.43.90.835.8
Inheritance Test0.429.42.64.41.56.9
Indexing Test0.4610.63.15.91.88.2
Graph (Binary Tree) Test0.675.90.413.70.544.8
Multithreading Test0.48failed2.6failed1.5failed
All Tests0.448.72.04.41.26.5

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

The results above show that in general DataNucleus with H2 embedded is much more efficient than EclipseLink with MySQL server in updating JPA entity objects in the database. Comparing the normalized speed of EclipseLink with MySQL database server (1.2) to the normalized speed of DataNucleus with H2 embedded database (6.5) reveals that in these tests, DataNucleus with H2 embedded is 5.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.23) to the normalized speed of DataNucleus with H2 embedded database (7.6) reveals that in that case, DataNucleus with H2 embedded is 33.0 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 embedded
EclipseLink
MySQL server
DataNucleus
H2 embedded
EclipseLink
MySQL server
DataNucleus
H2 embedded
Basic Person Test0.354.21.71.31.02.8
Element Collection Test0.114.90.511.60.313.2
Inheritance Test0.294.01.61.30.942.7
Indexing Test0.467.51.91.91.24.7
Graph (Binary Tree) Test0.545.60.494.10.514.8
Multithreading Test0.31failed3.6failed1.9failed
All Tests0.345.21.62.00.983.6

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

The results above show that in general DataNucleus with H2 embedded is much 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 embedded database (3.6) reveals that in these tests, DataNucleus with H2 embedded is 3.7 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 embedded database (4.9) reveals that in that case, DataNucleus with H2 embedded is 44.5 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 embedded
EclipseLink
MySQL server
DataNucleus
H2 embedded
EclipseLink
MySQL server
DataNucleus
H2 embedded
Basic Person Test1.310.34.25.62.77.9
Element Collection Test0.696.10.893.90.795.0
Inheritance Test1.19.04.84.92.96.9
Indexing Test1.410.14.97.63.28.9
Graph (Binary Tree) Test0.857.80.738.70.798.3
Multithreading Test2.016.54.05.93.011.2
All Tests1.29.63.36.02.37.8

The results above show that in general DataNucleus with H2 embedded is much more efficient than EclipseLink with MySQL server in performing JPA database operations. Comparing the normalized speed of EclipseLink with MySQL database server (2.3) to the normalized speed of DataNucleus with H2 embedded database (7.8) reveals that in these tests, DataNucleus with H2 embedded is 3.4 times faster than EclipseLink 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 EclipseLink with MySQL database server (0.73) to the normalized speed of DataNucleus with H2 embedded database (8.7) reveals that in that case, DataNucleus with H2 embedded is 11.9 times faster than EclipseLink with MySQL server.

Other Head to Head DBMS/JPA Comparisons