Compare with

Comparison of DataNucleus with HSQLDB embedded vs EclipseLink with H2 server

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 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
Basic Person Test14.25.64.82.59.54.0
Element Collection Test6.64.22.11.54.32.8
Inheritance Test13.66.64.62.19.14.4
Indexing Test24.69.711.14.117.86.9
Graph (Binary Tree) Test6.84.74.53.55.74.1
Multithreading Test38.510.28.54.023.57.1
All Tests17.46.85.92.911.74.9

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

A large performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with H2 database server (10.2) to the normalized speed of DataNucleus with HSQLDB embedded database (38.5) reveals that in that case, DataNucleus with HSQLDB embedded is 3.8 times faster than EclipseLink with H2 server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
Basic Person Test6.65.510.28.28.46.8
Element Collection Test3.63.28.14.25.83.7
Inheritance Test5.74.78.810.17.27.4
Indexing Test5.14.49.59.47.36.9
Graph (Binary Tree) Test7.21.19.31.98.31.5
Multithreading Test8.112.29.515.98.814.0
All Tests6.05.29.28.37.66.7

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

A large performance gap has been detected when using graphs of objects with small retrieval size. Comparing the normalized speed of EclipseLink with H2 database server (1.1) to the normalized speed of DataNucleus with HSQLDB embedded database (7.2) reveals that in that case, DataNucleus with HSQLDB embedded is 6.5 times faster than EclipseLink with H2 server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
Basic Person Test1.43.80.481.10.952.5
Element Collection Test1.34.10.671.11.02.6
Inheritance Test1.63.20.611.31.12.3
Indexing Test0.00163.00.638.00.325.5
Multithreading Test0.401.1failed1.00.401.1
All Tests0.963.00.602.50.802.8

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

The results above show that in general EclipseLink with H2 server 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 database server (2.8) reveals that in these tests, EclipseLink with H2 server is 3.5 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 database server (3.0) reveals that in that case, EclipseLink with H2 server is 1,875 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 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
Basic Person Test11.54.52.72.27.13.4
Element Collection Test6.93.82.72.44.83.1
Inheritance Test10.34.43.63.06.93.7
Indexing Test11.44.24.43.17.93.7
Graph (Binary Tree) Test3.51.41.50.792.51.1
Multithreading Testfailed7.8failed2.5failed5.1
All Tests8.74.33.02.35.83.3

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

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

A large performance gap has been detected when using database indexes with small transaction size. Comparing the normalized speed of EclipseLink with H2 database server (4.2) to the normalized speed of DataNucleus with HSQLDB embedded database (11.4) reveals that in that case, DataNucleus with HSQLDB embedded is 2.7 times faster than EclipseLink with H2 server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
Basic Person Test4.26.41.33.12.84.8
Element Collection Test4.93.01.61.33.22.2
Inheritance Test4.05.61.32.82.74.2
Indexing Test7.510.31.93.84.77.0
Graph (Binary Tree) Test2.91.52.01.32.51.4
Multithreading Test40.17.013.74.926.96.0
All Tests10.65.63.72.97.14.3

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

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

On the other hand, DataNucleus with HSQLDB embedded is slower, for instance, 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 database server (3.1) reveals that in that case, DataNucleus with HSQLDB embedded is 2.4 times slower than EclipseLink with H2 server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
Basic Person Test7.65.23.93.45.74.3
Element Collection Test4.73.63.02.13.82.9
Inheritance Test7.14.93.83.95.44.4
Indexing Test9.76.35.55.77.66.0
Graph (Binary Tree) Test5.12.14.31.94.72.0
Multithreading Test21.87.710.65.717.06.7
All Tests9.05.14.83.87.04.5

The results above show that in general DataNucleus with HSQLDB embedded is more efficient than EclipseLink with H2 server in performing JPA database operations.

A large performance gap has been detected when using multithreading with small transaction/retrieval size. Comparing the normalized speed of EclipseLink with H2 database server (7.7) to the normalized speed of DataNucleus with HSQLDB embedded database (21.8) reveals that in that case, DataNucleus with HSQLDB embedded is 2.8 times faster than EclipseLink with H2 server.

Other Head to Head DBMS/JPA Comparisons