Compare with

Comparison of EclipseLink with H2 server 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 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
Basic Person Test5.614.22.54.84.09.5
Element Collection Test4.26.61.52.12.84.3
Inheritance Test6.613.62.14.64.49.1
Indexing Test9.724.64.111.16.917.8
Graph (Binary Tree) Test4.76.83.54.54.15.7
Multithreading Test10.238.54.08.57.123.5
All Tests6.817.42.95.94.911.7

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
 EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
Basic Person Test5.56.68.210.26.88.4
Element Collection Test3.23.64.28.13.75.8
Inheritance Test4.75.710.18.87.47.2
Indexing Test4.45.19.49.56.97.3
Graph (Binary Tree) Test1.17.21.99.31.58.3
Multithreading Test12.28.115.99.514.08.8
All Tests5.26.08.39.26.77.6

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
 EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
Basic Person Test3.81.41.10.482.50.95
Element Collection Test4.11.31.10.672.61.0
Inheritance Test3.21.61.30.612.31.1
Indexing Test3.00.00168.00.635.50.32
Multithreading Test1.10.401.0failed1.10.40
All Tests3.00.962.50.602.80.80

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
 EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
Basic Person Test4.511.52.22.73.47.1
Element Collection Test3.86.92.42.73.14.8
Inheritance Test4.410.33.03.63.76.9
Indexing Test4.211.43.14.43.77.9
Graph (Binary Tree) Test1.43.50.791.51.12.5
Multithreading Test7.8failed2.5failed5.1failed
All Tests4.38.72.33.03.35.8

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
 EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
Basic Person Test6.44.23.11.34.82.8
Element Collection Test3.04.91.31.62.23.2
Inheritance Test5.64.02.81.34.22.7
Indexing Test10.37.53.81.97.04.7
Graph (Binary Tree) Test1.52.91.32.01.42.5
Multithreading Test7.040.14.913.76.026.9
All Tests5.610.62.93.74.37.1

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
 EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
EclipseLink
H2 server
DataNucleus
HSQLDB embedded
Basic Person Test5.27.63.43.94.35.7
Element Collection Test3.64.72.13.02.93.8
Inheritance Test4.97.13.93.84.45.4
Indexing Test6.39.75.75.56.07.6
Graph (Binary Tree) Test2.15.11.94.32.04.7
Multithreading Test7.721.85.710.66.717.0
All Tests5.19.03.84.84.57.0

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