Compare with

Comparison of OpenJPA with HSQLDB embedded vs DataNucleus with Derby server

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 server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
Basic Person Test13.32.86.92.310.12.6
Element Collection Test8.60.715.30.357.00.53
Inheritance Test12.22.75.82.09.02.3
Indexing Test16.74.59.14.012.94.3
Graph (Binary Tree) Test6.10.627.30.536.70.57
Multithreading Test26.84.97.03.416.94.1
All Tests13.92.76.92.110.42.4

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
Basic Person Test21.80.5630.16.325.93.4
Element Collection Test0.00680.364.50.932.20.64
Inheritance Test0.00250.452.06.80.983.6
Indexing Test22.10.5043.67.132.93.8
Graph (Binary Tree) Test2.10.222.16.62.13.4
Multithreading Test20.91.223.510.022.25.6
All Tests11.10.5517.66.314.43.4

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

A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (0.50) to the normalized speed of OpenJPA with HSQLDB embedded database (22.1) reveals that in that case, OpenJPA with HSQLDB embedded is 44.2 times faster than DataNucleus with Derby server.

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 database server (0.45) reveals that in that case, OpenJPA with HSQLDB embedded is 180 times slower than DataNucleus with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
Basic Person Test2.837.70.913.61.920.7
Element Collection Test1.425.90.951.41.213.6
Inheritance Test2.46.51.31.81.84.2
Indexing Test15.40.03034.34.924.92.5
Multithreading Test1.4failed0.53failed0.95failed
All Tests4.717.57.62.96.110.2

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

The results above show that in general DataNucleus with Derby server is more efficient than OpenJPA with HSQLDB embedded in executing the tested JPA queries.

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

On the other hand, DataNucleus with Derby server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (0.030) to the normalized speed of OpenJPA with HSQLDB embedded database (15.4) reveals that in that case, DataNucleus with Derby server is 513 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 server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
Basic Person Test12.01.15.30.858.60.99
Element Collection Test0.0170.813.70.621.80.71
Inheritance Test0.00981.22.01.30.991.2
Indexing Test9.31.25.51.57.41.3
Graph (Binary Tree) Test2.50.291.60.412.10.35
Multithreading Test20.0failed3.7failed11.8failed
All Tests7.30.933.60.925.50.92

DataNucleus with Derby server 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 server in updating JPA entity objects in the database. Comparing the normalized speed of DataNucleus with Derby database server (0.92) to the normalized speed of OpenJPA with HSQLDB embedded database (5.5) reveals that in these tests, OpenJPA with HSQLDB embedded is 6.0 times faster than DataNucleus with Derby server.

A huge performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with Derby database server (1.1) to the normalized speed of OpenJPA with HSQLDB embedded database (12.0) reveals that in that case, OpenJPA with HSQLDB embedded is 10.9 times faster than DataNucleus with Derby server.

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 database server (1.2) reveals that in that case, OpenJPA with HSQLDB embedded is 122 times slower than DataNucleus with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
Basic Person Test21.31.315.71.318.51.3
Element Collection Test0.0110.612.90.331.50.47
Inheritance Test0.00701.03.51.31.81.2
Indexing Test28.82.315.21.922.02.1
Graph (Binary Tree) Test2.90.263.60.463.20.36
Multithreading Test26.0failed19.6failed22.8failed
All Tests13.21.110.11.111.61.1

DataNucleus with Derby server 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 server in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with Derby database server (1.1) to the normalized speed of OpenJPA with HSQLDB embedded database (11.6) reveals that in these tests, OpenJPA with HSQLDB embedded is 10.5 times faster than DataNucleus with Derby server.

A huge performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with Derby database server (1.3) to the normalized speed of OpenJPA with HSQLDB embedded database (21.3) reveals that in that case, OpenJPA with HSQLDB embedded is 16.4 times faster than DataNucleus with Derby server.

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 database server (1.0) reveals that in that case, OpenJPA with HSQLDB embedded is 143 times slower than DataNucleus with Derby server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
Basic Person Test14.38.711.82.913.05.8
Element Collection Test2.05.73.50.722.73.2
Inheritance Test2.92.42.92.62.92.5
Indexing Test18.51.721.63.920.02.8
Graph (Binary Tree) Test3.40.353.72.03.51.2
Multithreading Test19.03.010.96.714.94.9
All Tests10.23.89.22.89.73.3

The results above show that in general OpenJPA with HSQLDB embedded is more efficient than DataNucleus with Derby server in performing JPA database operations. Comparing the normalized speed of DataNucleus with Derby database server (3.3) to the normalized speed of OpenJPA with HSQLDB embedded database (9.7) reveals that in these tests, OpenJPA with HSQLDB embedded is 2.9 times faster than DataNucleus with Derby server.

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

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 database server (5.7) reveals that in that case, OpenJPA with HSQLDB embedded is 2.8 times slower than DataNucleus with Derby server.

Other Head to Head DBMS/JPA Comparisons