Compare with

Comparison of OpenJPA with HSQLDB embedded vs DataNucleus with Derby 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
Derby embedded
OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
Basic Person Test13.34.66.92.810.13.7
Element Collection Test8.62.45.31.67.02.0
Inheritance Test12.24.65.82.79.03.7
Indexing Test16.77.69.14.812.96.2
Graph (Binary Tree) Test6.11.67.31.46.71.5
Multithreading Test26.88.67.03.316.95.9
All Tests13.94.96.92.810.43.8

The results above show that in general OpenJPA with HSQLDB embedded is more efficient than DataNucleus with Derby embedded in persisting JPA entity objects to the database. Comparing the normalized speed of DataNucleus with Derby embedded database (3.8) to the normalized speed of OpenJPA with HSQLDB embedded database (10.4) reveals that in these tests, OpenJPA with HSQLDB embedded is 2.7 times faster than DataNucleus with Derby embedded.

A large performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of DataNucleus with Derby embedded database (1.4) to the normalized speed of OpenJPA with HSQLDB embedded database (7.3) reveals that in that case, OpenJPA with HSQLDB embedded is 5.2 times faster than DataNucleus with Derby embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
Basic Person Test21.86.830.114.925.910.9
Element Collection Test0.00685.44.57.62.26.5
Inheritance Test0.00258.82.014.80.9811.8
Indexing Test22.19.243.614.132.911.6
Graph (Binary Tree) Test2.19.92.115.82.112.9
Multithreading Test20.911.923.511.522.211.7
All Tests11.18.717.613.114.410.9

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

A large performance gap has been detected when using simple basic entities with small retrieval size. Comparing the normalized speed of DataNucleus with Derby embedded database (6.8) to the normalized speed of OpenJPA with HSQLDB embedded database (21.8) reveals that in that case, OpenJPA with HSQLDB embedded is 3.2 times faster than DataNucleus with Derby 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 Derby embedded database (8.8) reveals that in that case, OpenJPA with HSQLDB embedded is 3,520 times slower than DataNucleus with Derby embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
Basic Person Test2.839.10.917.51.923.3
Element Collection Test1.446.00.956.71.226.3
Inheritance Test2.47.71.33.81.85.7
Indexing Test15.40.05334.38.024.94.0
Multithreading Test1.4failed0.53failed0.95failed
All Tests4.723.27.66.56.114.8

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

The results above show that in general DataNucleus with Derby embedded is more efficient than OpenJPA with HSQLDB embedded in executing the tested JPA queries. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (6.1) to the normalized speed of DataNucleus with Derby embedded database (14.8) reveals that in these tests, DataNucleus with Derby embedded is 2.4 times faster than OpenJPA with HSQLDB embedded.

A huge performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (1.4) to the normalized speed of DataNucleus with Derby embedded database (46.0) reveals that in that case, DataNucleus with Derby embedded is 32.9 times faster than OpenJPA with HSQLDB embedded.

On the other hand, DataNucleus with Derby embedded is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with Derby embedded database (0.053) to the normalized speed of OpenJPA with HSQLDB embedded database (15.4) reveals that in that case, DataNucleus with Derby embedded is 291 times slower than OpenJPA 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
Derby embedded
OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
Basic Person Test12.04.05.33.88.63.9
Element Collection Test0.0173.73.74.51.84.1
Inheritance Test0.00984.42.04.80.994.6
Indexing Test9.35.25.54.27.44.7
Graph (Binary Tree) Test2.52.71.61.52.12.1
Multithreading Test20.0failed3.7failed11.8failed
All Tests7.34.03.63.75.53.9

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

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

A large performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with Derby embedded database (4.0) to the normalized speed of OpenJPA with HSQLDB embedded database (12.0) reveals that in that case, OpenJPA with HSQLDB embedded is 3.0 times faster than DataNucleus with Derby 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.0098) to the normalized speed of DataNucleus with Derby embedded database (4.4) reveals that in that case, OpenJPA with HSQLDB embedded is 449 times slower than DataNucleus with Derby embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
Basic Person Test21.33.515.71.318.52.4
Element Collection Test0.0111.92.91.61.51.7
Inheritance Test0.00702.43.51.31.81.9
Indexing Test28.86.615.21.922.04.3
Graph (Binary Tree) Test2.90.813.60.933.20.87
Multithreading Test26.0failed19.6failed22.8failed
All Tests13.23.010.11.411.62.2

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

The results above show that in general OpenJPA with HSQLDB embedded is much more efficient than DataNucleus with Derby embedded in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with Derby embedded database (2.2) to the normalized speed of OpenJPA with HSQLDB embedded database (11.6) reveals that in these tests, OpenJPA with HSQLDB embedded is 5.3 times faster than DataNucleus with Derby embedded.

A huge performance gap has been detected when using simple basic entities with large transaction size. Comparing the normalized speed of DataNucleus with Derby 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 Derby 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 Derby embedded database (2.4) reveals that in that case, OpenJPA with HSQLDB embedded is 343 times slower than DataNucleus with Derby embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
Basic Person Test41.453.341.453.341.453.3
Element Collection Test46.942.646.942.646.942.6
Inheritance Test41.448.141.448.141.448.1
Indexing Test48.462.349.263.348.862.8
Graph (Binary Tree) Test28.513.621.410.225.011.9
Multithreading Test51.952.010.38.031.130.0
All Tests43.145.335.137.639.141.5

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

On the other hand, DataNucleus with Derby embedded is slower, for instance, when using graphs of objects with large transaction size. Comparing the normalized score of DataNucleus with Derby embedded database (10.2) to the normalized score of OpenJPA with HSQLDB embedded database (21.4) reveals that in that case, DataNucleus with Derby embedded is 2.1 times less efficient than OpenJPA 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
Derby embedded
OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
OpenJPA
HSQLDB embedded
DataNucleus
Derby embedded
Basic Person Test14.311.611.86.113.08.8
Element Collection Test2.011.93.54.42.78.1
Inheritance Test2.95.62.95.52.95.5
Indexing Test18.55.721.66.620.06.2
Graph (Binary Tree) Test3.43.73.74.93.54.3
Multithreading Test19.010.310.97.414.98.8
All Tests10.28.09.25.79.76.9

The results above show that in general OpenJPA with HSQLDB embedded is more efficient than DataNucleus with Derby 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 Derby embedded database (6.6) to the normalized speed of OpenJPA with HSQLDB embedded database (21.6) reveals that in that case, OpenJPA with HSQLDB embedded is 3.3 times faster than DataNucleus with Derby embedded.

On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with HSQLDB embedded database (2.0) to the normalized speed of DataNucleus with Derby embedded database (11.9) reveals that in that case, OpenJPA with HSQLDB embedded is 6.0 times slower than DataNucleus with Derby embedded.

Other Head to Head DBMS/JPA Comparisons