Compare with

Comparison of OpenJPA with Derby 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
 OpenJPA
Derby server
DataNucleus
HSQLDB embedded
OpenJPA
Derby server
DataNucleus
HSQLDB embedded
OpenJPA
Derby server
DataNucleus
HSQLDB embedded
Basic Person Test3.114.22.74.82.99.5
Element Collection Test2.06.61.72.11.84.3
Inheritance Test3.013.62.34.62.69.1
Indexing Test4.724.64.111.14.417.8
Graph (Binary Tree) Test0.716.80.644.50.675.7
Multithreading Test6.038.53.88.54.923.5
All Tests3.317.42.55.92.911.7

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
DataNucleus
HSQLDB embedded
OpenJPA
Derby server
DataNucleus
HSQLDB embedded
OpenJPA
Derby server
DataNucleus
HSQLDB embedded
Basic Person Test0.786.611.610.26.28.4
Element Collection Test0.00243.61.18.10.545.8
Inheritance Test0.0145.75.08.82.57.2
Indexing Test0.625.113.09.56.87.3
Graph (Binary Tree) Test0.0657.20.399.30.238.3
Multithreading Test1.68.119.09.510.38.8
All Tests0.516.08.49.24.47.6

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

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

On the other hand, DataNucleus with HSQLDB embedded is slower, for instance, when using multithreading with large retrieval size. Comparing the normalized speed of DataNucleus with HSQLDB embedded database (9.5) to the normalized speed of OpenJPA with Derby database server (19.0) reveals that in that case, DataNucleus with HSQLDB embedded is 2.0 times slower than OpenJPA with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
DataNucleus
HSQLDB embedded
OpenJPA
Derby server
DataNucleus
HSQLDB embedded
OpenJPA
Derby server
DataNucleus
HSQLDB embedded
Basic Person Test29.21.45.50.4817.30.95
Element Collection Test2.21.31.40.671.81.0
Inheritance Test2.21.61.00.611.61.1
Indexing Test2.20.001611.70.637.00.32
Multithreading Test35.50.408.3failed21.90.40
All Tests14.30.965.60.609.90.80

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

The results above show that in general OpenJPA with Derby 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 OpenJPA with Derby database server (9.9) reveals that in these tests, OpenJPA with Derby server is 12.4 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 Derby database server (2.2) reveals that in that case, OpenJPA with Derby server is 1,375 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
Derby server
DataNucleus
HSQLDB embedded
OpenJPA
Derby server
DataNucleus
HSQLDB embedded
OpenJPA
Derby server
DataNucleus
HSQLDB embedded
Basic Person Test1.511.54.02.72.87.1
Element Collection Test0.00816.91.92.70.944.8
Inheritance Test0.04310.33.83.61.96.9
Indexing Test1.811.46.84.44.37.9
Graph (Binary Tree) Test0.163.50.271.50.222.5
Multithreading Test6.9failed5.0failed5.9failed
All Tests1.78.73.63.02.75.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 OpenJPA with Derby server in updating JPA entity objects in the database. Comparing the normalized speed of OpenJPA with Derby database server (2.7) to the normalized speed of DataNucleus with HSQLDB embedded database (5.8) reveals that in these tests, DataNucleus with HSQLDB embedded is 2.1 times faster than OpenJPA with Derby server.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
DataNucleus
HSQLDB embedded
OpenJPA
Derby server
DataNucleus
HSQLDB embedded
OpenJPA
Derby server
DataNucleus
HSQLDB embedded
Basic Person Test1.44.23.71.32.52.8
Element Collection Test0.00824.91.41.60.713.2
Inheritance Test0.0354.02.51.31.32.7
Indexing Test2.37.53.51.92.94.7
Graph (Binary Tree) Test0.132.90.352.00.242.5
Multithreading Test3.640.14.013.73.826.9
All Tests1.310.62.63.71.97.1

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

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with Derby database server (0.0082) to the normalized speed of DataNucleus with HSQLDB embedded database (4.9) reveals that in that case, DataNucleus with HSQLDB embedded is 598 times faster than OpenJPA with Derby 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 OpenJPA with Derby database server (3.7) reveals that in that case, DataNucleus with HSQLDB embedded is 2.8 times slower than OpenJPA with Derby server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
DataNucleus
HSQLDB embedded
OpenJPA
Derby server
DataNucleus
HSQLDB embedded
OpenJPA
Derby server
DataNucleus
HSQLDB embedded
Basic Person Test7.27.65.53.96.45.7
Element Collection Test0.844.71.53.01.23.8
Inheritance Test1.17.12.93.82.05.4
Indexing Test2.39.77.85.55.17.6
Graph (Binary Tree) Test0.275.10.414.30.344.7
Multithreading Test10.721.88.010.69.417.0
All Tests3.99.04.54.84.27.0

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

A huge performance gap has been detected when using graphs of objects with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with Derby database server (0.27) to the normalized speed of DataNucleus with HSQLDB embedded database (5.1) reveals that in that case, DataNucleus with HSQLDB embedded is 18.9 times faster than OpenJPA with Derby server.

Other Head to Head DBMS/JPA Comparisons