Compare with

Comparison of DataNucleus with HSQLDB embedded vs EclipseLink 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
 DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
Basic Person Test14.225.14.88.99.517.0
Element Collection Test6.620.42.18.04.314.2
Inheritance Test13.628.74.68.79.118.7
Indexing Test24.637.611.114.017.825.8
Graph (Binary Tree) Test6.817.74.514.75.716.2
Multithreading Test38.530.38.511.423.520.8
All Tests17.426.65.910.911.718.8

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

A large performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of DataNucleus with HSQLDB embedded database (2.1) to the normalized speed of EclipseLink with H2 embedded database (8.0) reveals that in that case, EclipseLink with H2 embedded is 3.8 times faster than DataNucleus with HSQLDB embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
Basic Person Test6.630.410.229.18.429.7
Element Collection Test3.619.68.127.65.823.6
Inheritance Test5.733.88.839.87.236.8
Indexing Test5.122.29.541.37.331.8
Graph (Binary Tree) Test7.216.09.320.08.318.0
Multithreading Test8.133.79.529.08.831.4
All Tests6.025.99.231.17.628.5

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

A large performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of DataNucleus with HSQLDB embedded database (5.7) to the normalized speed of EclipseLink with H2 embedded database (33.8) reveals that in that case, EclipseLink with H2 embedded is 5.9 times faster than DataNucleus with HSQLDB embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
Basic Person Test1.44.40.481.40.952.9
Element Collection Test1.34.10.672.41.03.2
Inheritance Test1.63.40.612.01.12.7
Indexing Test0.001613.00.6322.80.3217.9
Multithreading Test0.401.0failed0.670.400.85
All Tests0.965.20.605.90.805.5

DataNucleus with HSQLDB embedded 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 HSQLDB embedded in executing the tested JPA queries. Comparing the normalized speed of DataNucleus with HSQLDB embedded database (0.80) to the normalized speed of EclipseLink with H2 embedded database (5.5) reveals that in these tests, EclipseLink with H2 embedded is 6.9 times faster than DataNucleus with HSQLDB embedded.

A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with HSQLDB embedded database (0.0016) to the normalized speed of EclipseLink with H2 embedded database (13.0) reveals that in that case, EclipseLink with H2 embedded is 8,125 times faster than DataNucleus with HSQLDB embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
Basic Person Test11.516.62.77.67.112.1
Element Collection Test6.915.32.710.54.812.9
Inheritance Test10.315.73.69.86.912.7
Indexing Test11.412.14.49.97.911.0
Graph (Binary Tree) Test3.513.71.57.02.510.3
Multithreading Testfailed20.9failed4.2failed12.6
All Tests8.715.73.08.25.812.0

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

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

A large performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of DataNucleus with HSQLDB embedded database (1.5) to the normalized speed of EclipseLink with H2 embedded database (7.0) reveals that in that case, EclipseLink with H2 embedded is 4.7 times faster than DataNucleus with HSQLDB embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
Basic Person Test4.235.11.319.62.827.4
Element Collection Test4.919.31.68.53.213.9
Inheritance Test4.036.01.314.02.725.0
Indexing Test7.542.51.919.24.730.9
Graph (Binary Tree) Test2.912.22.014.42.513.3
Multithreading Test40.154.413.725.826.940.1
All Tests10.633.33.716.97.125.1

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

A huge performance gap has been detected when using simple basic entities with large transaction size. Comparing the normalized speed of DataNucleus with HSQLDB embedded database (1.3) to the normalized speed of EclipseLink with H2 embedded database (19.6) reveals that in that case, EclipseLink with H2 embedded is 15.1 times faster than DataNucleus with HSQLDB embedded.

Comparison of database storage efficiency (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
Basic Person Test41.436.241.439.241.437.7
Element Collection Test23.433.323.434.923.434.1
Inheritance Test41.435.441.436.241.435.8
Indexing Test48.439.849.243.748.841.7
Graph (Binary Tree) Test12.541.09.428.410.934.7
Multithreading Test51.948.710.312.431.130.6
All Tests36.539.129.232.532.935.8

The results above show that in general EclipseLink with H2 embedded is slightly more efficient than DataNucleus with HSQLDB embedded in using disk space.

A large gap has been detected when using graphs of objects with small transaction size. Comparing the normalized score of DataNucleus with HSQLDB embedded database (12.5) to the normalized score of EclipseLink with H2 embedded database (41.0) reveals that in that case, EclipseLink with H2 embedded is 3.3 times more efficient than DataNucleus with HSQLDB embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
Basic Person Test7.622.33.913.35.717.8
Element Collection Test4.715.73.011.43.813.6
Inheritance Test7.123.53.814.95.419.2
Indexing Test9.725.55.521.57.623.5
Graph (Binary Tree) Test5.114.94.314.04.714.5
Multithreading Test21.828.110.614.217.021.1
All Tests9.021.94.814.97.018.4

The results above show that in general EclipseLink with H2 embedded is more efficient than DataNucleus with HSQLDB embedded in performing JPA database operations. Comparing the normalized speed of DataNucleus with HSQLDB embedded database (7.0) to the normalized speed of EclipseLink with H2 embedded database (18.4) reveals that in these tests, EclipseLink with H2 embedded is 2.6 times faster than DataNucleus with HSQLDB embedded.

A large performance gap has been detected when using class inheritance in the object model with large transaction/retrieval size. Comparing the normalized speed of DataNucleus with HSQLDB embedded database (3.8) to the normalized speed of EclipseLink with H2 embedded database (14.9) reveals that in that case, EclipseLink with H2 embedded is 3.9 times faster than DataNucleus with HSQLDB embedded.

Other Head to Head DBMS/JPA Comparisons