Compare with

Comparison of EclipseLink with H2 embedded vs DataNucleus 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
 EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
Basic Person Test25.114.28.94.817.09.5
Element Collection Test20.46.68.02.114.24.3
Inheritance Test28.713.68.74.618.79.1
Indexing Test37.624.614.011.125.817.8
Graph (Binary Tree) Test17.76.814.74.516.25.7
Multithreading Test30.338.511.48.520.823.5
All Tests26.617.410.95.918.811.7

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
 EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
Basic Person Test30.46.629.110.229.78.4
Element Collection Test19.63.627.68.123.65.8
Inheritance Test33.85.739.88.836.87.2
Indexing Test22.25.141.39.531.87.3
Graph (Binary Tree) Test16.07.220.09.318.08.3
Multithreading Test33.78.129.09.531.48.8
All Tests25.96.031.19.228.57.6

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
 EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
Basic Person Test4.41.41.40.482.90.95
Element Collection Test4.11.32.40.673.21.0
Inheritance Test3.41.62.00.612.71.1
Indexing Test13.00.001622.80.6317.90.32
Multithreading Test1.00.400.67failed0.850.40
All Tests5.20.965.90.605.50.80

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
 EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
Basic Person Test16.611.57.62.712.17.1
Element Collection Test15.36.910.52.712.94.8
Inheritance Test15.710.39.83.612.76.9
Indexing Test12.111.49.94.411.07.9
Graph (Binary Tree) Test13.73.57.01.510.32.5
Multithreading Test20.9failed4.2failed12.6failed
All Tests15.78.78.23.012.05.8

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
 EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
Basic Person Test35.14.219.61.327.42.8
Element Collection Test19.34.98.51.613.93.2
Inheritance Test36.04.014.01.325.02.7
Indexing Test42.57.519.21.930.94.7
Graph (Binary Tree) Test12.22.914.42.013.32.5
Multithreading Test54.440.125.813.740.126.9
All Tests33.310.616.93.725.17.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
 EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
Basic Person Test36.241.439.241.437.741.4
Element Collection Test33.323.434.923.434.123.4
Inheritance Test35.441.436.241.435.841.4
Indexing Test39.848.443.749.241.748.8
Graph (Binary Tree) Test41.012.528.49.434.710.9
Multithreading Test48.751.912.410.330.631.1
All Tests39.136.532.529.235.832.9

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
 EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
EclipseLink
H2 embedded
DataNucleus
HSQLDB embedded
Basic Person Test22.37.613.33.917.85.7
Element Collection Test15.74.711.43.013.63.8
Inheritance Test23.57.114.93.819.25.4
Indexing Test25.59.721.55.523.57.6
Graph (Binary Tree) Test14.95.114.04.314.54.7
Multithreading Test28.121.814.210.621.117.0
All Tests21.99.014.94.818.47.0

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