Compare with

Comparison of OpenJPA with Derby 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
Derby embedded
DataNucleus
Derby server
OpenJPA
Derby embedded
DataNucleus
Derby server
OpenJPA
Derby embedded
DataNucleus
Derby server
Basic Person Test4.82.82.92.33.92.6
Element Collection Test2.80.711.90.352.40.53
Inheritance Test4.12.72.42.03.32.3
Indexing Test6.14.54.14.05.14.3
Graph (Binary Tree) Test1.50.621.40.531.40.57
Multithreading Test8.74.93.33.46.04.1
All Tests4.72.72.72.13.72.4

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

A large 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 Derby embedded database (1.9) reveals that in that case, OpenJPA with Derby embedded is 5.4 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
Derby embedded
DataNucleus
Derby server
OpenJPA
Derby embedded
DataNucleus
Derby server
OpenJPA
Derby embedded
DataNucleus
Derby server
Basic Person Test14.80.5622.66.318.73.4
Element Collection Test0.00310.362.30.931.20.64
Inheritance Test0.0150.457.06.83.53.6
Indexing Test11.70.5026.57.119.13.8
Graph (Binary Tree) Test0.930.221.26.61.13.4
Multithreading Test25.21.228.610.026.95.6
All Tests8.80.5514.76.311.73.4

The results above show that in general OpenJPA with Derby 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 Derby embedded database (11.7) reveals that in these tests, OpenJPA with Derby embedded is 3.4 times faster than DataNucleus with Derby server.

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

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0031) to the normalized speed of DataNucleus with Derby database server (0.36) reveals that in that case, OpenJPA with Derby embedded is 116 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
Derby embedded
DataNucleus
Derby server
OpenJPA
Derby embedded
DataNucleus
Derby server
OpenJPA
Derby embedded
DataNucleus
Derby server
Basic Person Test49.737.79.93.629.820.7
Element Collection Test2.725.99.61.46.113.6
Inheritance Test2.36.51.31.81.84.2
Indexing Test7.00.03017.14.912.12.5
Multithreading Test40.9failed11.7failed26.3failed
All Tests20.517.59.92.915.210.2

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

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

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.030) to the normalized speed of OpenJPA with Derby embedded database (7.0) reveals that in that case, OpenJPA with Derby embedded is 233 times faster than DataNucleus with Derby server.

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (2.7) to the normalized speed of DataNucleus with Derby database server (25.9) reveals that in that case, OpenJPA with Derby embedded is 9.6 times slower than DataNucleus with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby embedded
DataNucleus
Derby server
OpenJPA
Derby embedded
DataNucleus
Derby server
OpenJPA
Derby embedded
DataNucleus
Derby server
Basic Person Test5.61.15.20.855.40.99
Element Collection Test0.00900.812.20.621.10.71
Inheritance Test0.0451.24.61.32.31.2
Indexing Test6.11.28.71.57.41.3
Graph (Binary Tree) Test1.60.290.910.411.30.35
Multithreading Test18.3failed4.5failed11.4failed
All Tests5.30.934.40.924.80.92

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

The results above show that in general OpenJPA with Derby 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 Derby embedded database (4.8) reveals that in these tests, OpenJPA with Derby embedded is 5.2 times faster than DataNucleus with Derby server.

A large performance gap has been detected when using simple basic entities with large transaction size. Comparing the normalized speed of DataNucleus with Derby database server (0.85) to the normalized speed of OpenJPA with Derby embedded database (5.2) reveals that in that case, OpenJPA with Derby embedded is 6.1 times faster than DataNucleus with Derby server.

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0090) to the normalized speed of DataNucleus with Derby database server (0.81) reveals that in that case, OpenJPA with Derby embedded is 90.0 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
Derby embedded
DataNucleus
Derby server
OpenJPA
Derby embedded
DataNucleus
Derby server
OpenJPA
Derby embedded
DataNucleus
Derby server
Basic Person Test4.21.34.51.34.31.3
Element Collection Test0.00710.611.60.330.800.47
Inheritance Test0.0351.03.01.31.51.2
Indexing Test5.32.33.61.94.42.1
Graph (Binary Tree) Test0.800.260.930.460.860.36
Multithreading Test5.7failed6.2failed6.0failed
All Tests2.71.13.31.13.01.1

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

The results above show that in general OpenJPA with Derby embedded is 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 Derby embedded database (3.0) reveals that in these tests, OpenJPA with Derby embedded is 2.7 times faster than DataNucleus with Derby server.

A large 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.33) to the normalized speed of OpenJPA with Derby embedded database (1.6) reveals that in that case, OpenJPA with Derby embedded is 4.8 times faster than DataNucleus with Derby server.

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0071) to the normalized speed of DataNucleus with Derby database server (0.61) reveals that in that case, OpenJPA with Derby embedded is 85.9 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
Derby embedded
DataNucleus
Derby server
OpenJPA
Derby embedded
DataNucleus
Derby server
OpenJPA
Derby embedded
DataNucleus
Derby server
Basic Person Test15.88.79.02.912.45.8
Element Collection Test1.15.73.50.722.33.2
Inheritance Test1.32.43.72.62.52.5
Indexing Test7.21.712.03.99.62.8
Graph (Binary Tree) Test1.20.351.12.01.21.2
Multithreading Test19.83.010.96.715.34.9
All Tests8.03.86.92.87.43.3

The results above show that in general OpenJPA with Derby 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 Derby embedded database (7.4) reveals that in these tests, OpenJPA with Derby embedded is 2.2 times faster than DataNucleus with Derby server.

A large performance gap has been detected when using multithreading with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with Derby database server (3.0) to the normalized speed of OpenJPA with Derby embedded database (19.8) reveals that in that case, OpenJPA with Derby embedded is 6.6 times faster than DataNucleus with Derby server.

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

Other Head to Head DBMS/JPA Comparisons