Compare with

Comparison of DataNucleus with Derby server vs OpenJPA 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
 DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
Basic Person Test2.813.32.36.92.610.1
Element Collection Test0.718.60.355.30.537.0
Inheritance Test2.712.22.05.82.39.0
Indexing Test4.516.74.09.14.312.9
Graph (Binary Tree) Test0.626.10.537.30.576.7
Multithreading Test4.926.83.47.04.116.9
All Tests2.713.92.16.92.410.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
 DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
Basic Person Test0.5621.86.330.13.425.9
Element Collection Test0.360.00680.934.50.642.2
Inheritance Test0.450.00256.82.03.60.98
Indexing Test0.5022.17.143.63.832.9
Graph (Binary Tree) Test0.222.16.62.13.42.1
Multithreading Test1.220.910.023.55.622.2
All Tests0.5511.16.317.63.414.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
 DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
Basic Person Test37.72.83.60.9120.71.9
Element Collection Test25.91.41.40.9513.61.2
Inheritance Test6.52.41.81.34.21.8
Indexing Test0.03015.44.934.32.524.9
Multithreading Testfailed1.4failed0.53failed0.95
All Tests17.54.72.97.610.26.1

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
 DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
Basic Person Test1.112.00.855.30.998.6
Element Collection Test0.810.0170.623.70.711.8
Inheritance Test1.20.00981.32.01.20.99
Indexing Test1.29.31.55.51.37.4
Graph (Binary Tree) Test0.292.50.411.60.352.1
Multithreading Testfailed20.0failed3.7failed11.8
All Tests0.937.30.923.60.925.5

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
 DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
Basic Person Test1.321.31.315.71.318.5
Element Collection Test0.610.0110.332.90.471.5
Inheritance Test1.00.00701.33.51.21.8
Indexing Test2.328.81.915.22.122.0
Graph (Binary Tree) Test0.262.90.463.60.363.2
Multithreading Testfailed26.0failed19.6failed22.8
All Tests1.113.21.110.11.111.6

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
 DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
DataNucleus
Derby server
OpenJPA
HSQLDB embedded
Basic Person Test8.714.32.911.85.813.0
Element Collection Test5.72.00.723.53.22.7
Inheritance Test2.42.92.62.92.52.9
Indexing Test1.718.53.921.62.820.0
Graph (Binary Tree) Test0.353.42.03.71.23.5
Multithreading Test3.019.06.710.94.914.9
All Tests3.810.22.89.23.39.7

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