Compare with

Comparison of EclipseLink with HSQLDB embedded 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
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
Basic Person Test27.119.217.28.022.213.6
Element Collection Test17.26.68.22.812.74.7
Inheritance Test26.715.611.94.419.310.0
Indexing Test30.624.418.611.824.618.1
Graph (Binary Tree) Test20.09.215.96.218.07.7
Multithreading Test32.534.911.47.122.021.0
All Tests25.718.313.96.719.812.5

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
 EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
Basic Person Test24.413.236.013.530.213.3
Element Collection Test14.96.419.18.917.07.7
Inheritance Test22.812.240.012.731.412.4
Indexing Test20.78.138.716.529.712.3
Graph (Binary Tree) Test8.710.614.220.911.415.8
Multithreading Test24.213.328.09.926.111.6
All Tests19.310.629.313.724.312.2

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
 EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
Basic Person Test2.94.70.881.41.93.1
Element Collection Test3.25.01.42.42.33.7
Inheritance Test2.63.81.11.61.92.7
Indexing Test21.50.004133.31.827.40.91
Multithreading Test1.11.20.520.790.821.0
All Tests6.33.07.41.66.92.3

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
 EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
Basic Person Test17.910.07.03.912.56.9
Element Collection Test14.67.68.33.911.45.8
Inheritance Test16.29.49.74.413.06.9
Indexing Test12.010.66.85.99.48.2
Graph (Binary Tree) Test4.75.93.43.74.04.8
Multithreading Test24.4failed4.4failed14.4failed
All Tests15.08.76.64.410.86.5

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
 EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
Basic Person Test32.34.220.31.326.32.8
Element Collection Test14.34.96.01.610.23.2
Inheritance Test29.24.023.91.326.62.7
Indexing Test55.37.527.11.941.24.7
Graph (Binary Tree) Test6.85.614.14.110.44.8
Multithreading Test52.9failed28.4failed40.6failed
All Tests31.85.220.02.025.93.6

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
 EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
Basic Person Test41.427.041.427.041.427.0
Element Collection Test46.922.446.922.446.922.4
Inheritance Test41.427.041.427.041.427.0
Indexing Test48.431.649.232.148.831.9
Graph (Binary Tree) Test28.520.021.415.025.017.5
Multithreading Test51.933.910.39.231.121.5
All Tests43.127.035.122.139.124.6

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
 EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
EclipseLink
HSQLDB embedded
DataNucleus
H2 embedded
Basic Person Test20.910.316.35.618.67.9
Element Collection Test12.86.18.63.910.75.0
Inheritance Test19.59.017.34.918.46.9
Indexing Test28.010.124.97.626.58.9
Graph (Binary Tree) Test10.07.811.98.711.08.3
Multithreading Test27.016.514.65.920.811.2
All Tests20.19.615.76.017.97.8

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