Compare with

Comparison of DataNucleus with H2 embedded vs EclipseLink with HSQLDB 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
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
Basic Person Test19.227.18.017.213.622.2
Element Collection Test6.617.22.88.24.712.7
Inheritance Test15.626.74.411.910.019.3
Indexing Test24.430.611.818.618.124.6
Graph (Binary Tree) Test9.220.06.215.97.718.0
Multithreading Test34.932.57.111.421.022.0
All Tests18.325.76.713.912.519.8

The results above show that in general EclipseLink with HSQLDB embedded is more efficient than DataNucleus with H2 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 H2 embedded database (2.8) to the normalized speed of EclipseLink with HSQLDB embedded database (8.2) reveals that in that case, EclipseLink with HSQLDB embedded is 2.9 times faster than DataNucleus with H2 embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
Basic Person Test13.224.413.536.013.330.2
Element Collection Test6.414.98.919.17.717.0
Inheritance Test12.222.812.740.012.431.4
Indexing Test8.120.716.538.712.329.7
Graph (Binary Tree) Test10.68.720.914.215.811.4
Multithreading Test13.324.29.928.011.626.1
All Tests10.619.313.729.312.224.3

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
Basic Person Test4.72.91.40.883.11.9
Element Collection Test5.03.22.41.43.72.3
Inheritance Test3.82.61.61.12.71.9
Indexing Test0.004121.51.833.30.9127.4
Multithreading Test1.21.10.790.521.00.82
All Tests3.06.31.67.42.36.9

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than DataNucleus with H2 embedded in executing the tested JPA queries. Comparing the normalized speed of DataNucleus with H2 embedded database (2.3) to the normalized speed of EclipseLink with HSQLDB embedded database (6.9) reveals that in these tests, EclipseLink with HSQLDB embedded is 3.0 times faster than DataNucleus with H2 embedded.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
Basic Person Test10.017.93.97.06.912.5
Element Collection Test7.614.63.98.35.811.4
Inheritance Test9.416.24.49.76.913.0
Indexing Test10.612.05.96.88.29.4
Graph (Binary Tree) Test5.94.73.73.44.84.0
Multithreading Testfailed24.4failed4.4failed14.4
All Tests8.715.04.46.66.510.8

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

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
Basic Person Test4.232.31.320.32.826.3
Element Collection Test4.914.31.66.03.210.2
Inheritance Test4.029.21.323.92.726.6
Indexing Test7.555.31.927.14.741.2
Graph (Binary Tree) Test5.66.84.114.14.810.4
Multithreading Testfailed52.9failed28.4failed40.6
All Tests5.231.82.020.03.625.9

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

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
Basic Person Test27.041.427.041.427.041.4
Element Collection Test22.446.922.446.922.446.9
Inheritance Test27.041.427.041.427.041.4
Indexing Test31.648.432.149.231.948.8
Graph (Binary Tree) Test20.028.515.021.417.525.0
Multithreading Test33.951.99.210.321.531.1
All Tests27.043.122.135.124.639.1

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

A large gap has been detected when using JPA element collections with small transaction size. Comparing the normalized score of DataNucleus with H2 embedded database (22.4) to the normalized score of EclipseLink with HSQLDB embedded database (46.9) reveals that in that case, EclipseLink with HSQLDB embedded is 2.1 times more efficient than DataNucleus with H2 embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
Basic Person Test10.320.95.616.37.918.6
Element Collection Test6.112.83.98.65.010.7
Inheritance Test9.019.54.917.36.918.4
Indexing Test10.128.07.624.98.926.5
Graph (Binary Tree) Test7.810.08.711.98.311.0
Multithreading Test16.527.05.914.611.220.8
All Tests9.620.16.015.77.817.9

The results above show that in general EclipseLink with HSQLDB embedded is more efficient than DataNucleus with H2 embedded in performing JPA database operations. Comparing the normalized speed of DataNucleus with H2 embedded database (7.8) to the normalized speed of EclipseLink with HSQLDB embedded database (17.9) reveals that in these tests, EclipseLink with HSQLDB embedded is 2.3 times faster than DataNucleus with H2 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 H2 embedded database (4.9) to the normalized speed of EclipseLink with HSQLDB embedded database (17.3) reveals that in that case, EclipseLink with HSQLDB embedded is 3.5 times faster than DataNucleus with H2 embedded.

Other Head to Head DBMS/JPA Comparisons