Compare with

Comparison of OpenJPA with HSQLDB 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
 OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
Basic Person Test13.314.26.94.810.19.5
Element Collection Test8.66.65.32.17.04.3
Inheritance Test12.213.65.84.69.09.1
Indexing Test16.724.69.111.112.917.8
Graph (Binary Tree) Test6.16.87.34.56.75.7
Multithreading Test26.838.57.08.516.923.5
All Tests13.917.46.95.910.411.7

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

On the other hand, DataNucleus with HSQLDB embedded is slower, for instance, 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 OpenJPA with HSQLDB embedded database (5.3) reveals that in that case, DataNucleus with HSQLDB embedded is 2.5 times slower than OpenJPA with HSQLDB embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
Basic Person Test21.86.630.110.225.98.4
Element Collection Test0.00683.64.58.12.25.8
Inheritance Test0.00255.72.08.80.987.2
Indexing Test22.15.143.69.532.97.3
Graph (Binary Tree) Test2.17.22.19.32.18.3
Multithreading Test20.98.123.59.522.28.8
All Tests11.16.017.69.214.47.6

The results above show that in general OpenJPA with HSQLDB 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 database indexes with large retrieval size. Comparing the normalized speed of DataNucleus with HSQLDB embedded database (9.5) to the normalized speed of OpenJPA with HSQLDB embedded database (43.6) reveals that in that case, OpenJPA with HSQLDB embedded is 4.6 times faster than DataNucleus with HSQLDB embedded.

On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (0.0025) to the normalized speed of DataNucleus with HSQLDB embedded database (5.7) reveals that in that case, OpenJPA with HSQLDB embedded is 2,280 times slower than DataNucleus with HSQLDB embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
Basic Person Test2.81.40.910.481.90.95
Element Collection Test1.41.30.950.671.21.0
Inheritance Test2.41.61.30.611.81.1
Indexing Test15.40.001634.30.6324.90.32
Multithreading Test1.40.400.53failed0.950.40
All Tests4.70.967.60.606.10.80

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

The results above show that in general OpenJPA with HSQLDB 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 OpenJPA with HSQLDB embedded database (6.1) reveals that in these tests, OpenJPA with HSQLDB embedded is 7.6 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 OpenJPA with HSQLDB embedded database (15.4) reveals that in that case, OpenJPA with HSQLDB embedded is 9,625 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
 OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
Basic Person Test12.011.55.32.78.67.1
Element Collection Test0.0176.93.72.71.84.8
Inheritance Test0.009810.32.03.60.996.9
Indexing Test9.311.45.54.47.47.9
Graph (Binary Tree) Test2.53.51.61.52.12.5
Multithreading Test20.0failed3.7failed11.8failed
All Tests7.38.73.63.05.55.8

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

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

A huge performance gap has been detected when using class inheritance in the object model with small transaction size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (0.0098) to the normalized speed of DataNucleus with HSQLDB embedded database (10.3) reveals that in that case, DataNucleus with HSQLDB embedded is 1,051 times faster than OpenJPA with HSQLDB embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
Basic Person Test21.34.215.71.318.52.8
Element Collection Test0.0114.92.91.61.53.2
Inheritance Test0.00704.03.51.31.82.7
Indexing Test28.87.515.21.922.04.7
Graph (Binary Tree) Test2.92.93.62.03.22.5
Multithreading Test26.040.119.613.722.826.9
All Tests13.210.610.13.711.67.1

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

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 OpenJPA with HSQLDB embedded database (15.7) reveals that in that case, OpenJPA with HSQLDB embedded is 12.1 times faster than DataNucleus with HSQLDB embedded.

On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, when using class inheritance in the object model with small transaction size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (0.0070) to the normalized speed of DataNucleus with HSQLDB embedded database (4.0) reveals that in that case, OpenJPA with HSQLDB embedded is 571 times slower than DataNucleus with HSQLDB embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
Basic Person Test41.441.441.441.441.441.4
Element Collection Test46.923.446.923.446.923.4
Inheritance Test41.441.441.441.441.441.4
Indexing Test48.448.449.249.248.848.8
Graph (Binary Tree) Test28.512.521.49.425.010.9
Multithreading Test51.951.910.310.331.131.1
All Tests43.136.535.129.239.132.9

The results above show that in general OpenJPA with HSQLDB 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 OpenJPA with HSQLDB embedded database (28.5) reveals that in that case, OpenJPA with HSQLDB embedded is 2.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
 OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
OpenJPA
HSQLDB embedded
DataNucleus
HSQLDB embedded
Basic Person Test14.37.611.83.913.05.7
Element Collection Test2.04.73.53.02.73.8
Inheritance Test2.97.12.93.82.95.4
Indexing Test18.59.721.65.520.07.6
Graph (Binary Tree) Test3.45.13.74.33.54.7
Multithreading Test19.021.810.910.614.917.0
All Tests10.29.09.24.89.77.0

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

A large performance gap has been detected when using database indexes with large transaction/retrieval size. Comparing the normalized speed of DataNucleus with HSQLDB embedded database (5.5) to the normalized speed of OpenJPA with HSQLDB embedded database (21.6) reveals that in that case, OpenJPA with HSQLDB embedded is 3.9 times faster than DataNucleus with HSQLDB embedded.

On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, when using class inheritance in the object model with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (2.9) to the normalized speed of DataNucleus with HSQLDB embedded database (7.1) reveals that in that case, OpenJPA with HSQLDB embedded is 2.4 times slower than DataNucleus with HSQLDB embedded.

Other Head to Head DBMS/JPA Comparisons