Compare with

Comparison of DataNucleus 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
 DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
Basic Person Test14.219.24.88.09.513.6
Element Collection Test6.66.62.12.84.34.7
Inheritance Test13.615.64.64.49.110.0
Indexing Test24.624.411.111.817.818.1
Graph (Binary Tree) Test6.89.24.56.25.77.7
Multithreading Test38.534.98.57.123.521.0
All Tests17.418.35.96.711.712.5

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
Basic Person Test6.613.210.213.58.413.3
Element Collection Test3.66.48.18.95.87.7
Inheritance Test5.712.28.812.77.212.4
Indexing Test5.18.19.516.57.312.3
Graph (Binary Tree) Test7.210.69.320.98.315.8
Multithreading Test8.113.39.59.98.811.6
All Tests6.010.69.213.77.612.2

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

A large performance gap has been detected when using graphs of objects with large retrieval size. Comparing the normalized speed of DataNucleus with HSQLDB embedded database (9.3) to the normalized speed of DataNucleus with H2 embedded database (20.9) reveals that in that case, DataNucleus with H2 embedded is 2.2 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
 DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
Basic Person Test1.44.70.481.40.953.1
Element Collection Test1.35.00.672.41.03.7
Inheritance Test1.63.80.611.61.12.7
Indexing Test0.00160.00410.631.80.320.91
Multithreading Test0.401.2failed0.790.401.0
All Tests0.963.00.601.60.802.3

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

The results above show that in general DataNucleus with H2 embedded is 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 DataNucleus with H2 embedded database (2.3) reveals that in these tests, DataNucleus with H2 embedded is 2.9 times faster than DataNucleus with HSQLDB embedded.

A large performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of DataNucleus with HSQLDB embedded database (1.3) to the normalized speed of DataNucleus with H2 embedded database (5.0) reveals that in that case, DataNucleus with H2 embedded is 3.8 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
DataNucleus
H2 embedded
DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
Basic Person Test11.510.02.73.97.16.9
Element Collection Test6.97.62.73.94.85.8
Inheritance Test10.39.43.64.46.96.9
Indexing Test11.410.64.45.97.98.2
Graph (Binary Tree) Test3.55.91.53.72.54.8
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests8.78.73.04.45.86.5

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

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

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 DataNucleus with H2 embedded database (3.7) reveals that in that case, DataNucleus with H2 embedded is 2.5 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
 DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
Basic Person Test4.24.21.31.32.82.8
Element Collection Test4.94.91.61.63.23.2
Inheritance Test4.04.01.31.32.72.7
Indexing Test7.57.51.91.94.74.7
Graph (Binary Tree) Test2.95.62.04.12.54.8
Multithreading Test40.1failed13.7failed26.9failed
All Tests10.65.23.72.07.13.6

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

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

On the other hand, DataNucleus with HSQLDB embedded is slower, for instance, when using graphs of objects with large transaction size. Comparing the normalized speed of DataNucleus with HSQLDB embedded database (2.0) to the normalized speed of DataNucleus with H2 embedded database (4.1) reveals that in that case, DataNucleus with HSQLDB embedded is 2.0 times slower than DataNucleus with H2 embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
Basic Person Test41.427.041.427.041.427.0
Element Collection Test23.422.423.422.423.422.4
Inheritance Test41.427.041.427.041.427.0
Indexing Test48.431.649.232.148.831.9
Graph (Binary Tree) Test12.520.09.415.010.917.5
Multithreading Test51.933.910.39.231.121.5
All Tests36.527.029.222.132.924.6

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
DataNucleus
HSQLDB embedded
DataNucleus
H2 embedded
Basic Person Test7.610.33.95.65.77.9
Element Collection Test4.76.13.03.93.85.0
Inheritance Test7.19.03.84.95.46.9
Indexing Test9.710.15.57.67.68.9
Graph (Binary Tree) Test5.17.84.38.74.78.3
Multithreading Test21.816.510.65.917.011.2
All Tests9.09.64.86.07.07.8

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

A large performance gap has been detected when using graphs of objects with large transaction/retrieval size. Comparing the normalized speed of DataNucleus with HSQLDB embedded database (4.3) to the normalized speed of DataNucleus with H2 embedded database (8.7) reveals that in that case, DataNucleus with H2 embedded is 2.0 times faster than DataNucleus with HSQLDB embedded.

Other Head to Head DBMS/JPA Comparisons