Compare with

Comparison of DataNucleus with H2 server vs OpenJPA 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
 DataNucleus
H2 server
OpenJPA
Derby embedded
DataNucleus
H2 server
OpenJPA
Derby embedded
DataNucleus
H2 server
OpenJPA
Derby embedded
Basic Person Test3.44.82.22.92.83.9
Element Collection Test1.22.80.641.90.922.4
Inheritance Test3.04.11.92.42.43.3
Indexing Test5.36.13.54.14.45.1
Graph (Binary Tree) Test2.11.51.31.41.71.4
Multithreading Test10.08.74.33.37.26.0
All Tests4.24.72.32.73.23.7

The results above show that in general OpenJPA with Derby embedded is slightly more efficient than DataNucleus with H2 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 H2 database server (0.64) to the normalized speed of OpenJPA with Derby embedded database (1.9) reveals that in that case, OpenJPA with Derby embedded is 3.0 times faster than DataNucleus with H2 server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 server
OpenJPA
Derby embedded
DataNucleus
H2 server
OpenJPA
Derby embedded
DataNucleus
H2 server
OpenJPA
Derby embedded
Basic Person Test2.514.85.222.63.918.7
Element Collection Test0.560.00311.12.30.821.2
Inheritance Test2.20.0156.17.04.23.5
Indexing Test2.111.77.726.54.919.1
Graph (Binary Tree) Test5.70.938.91.27.31.1
Multithreading Test2.325.28.728.65.526.9
All Tests2.58.86.314.74.411.7

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

A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of DataNucleus with H2 database server (2.3) to the normalized speed of OpenJPA with Derby embedded database (25.2) reveals that in that case, OpenJPA with Derby embedded is 11.0 times faster than DataNucleus with H2 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 H2 database server (0.56) reveals that in that case, OpenJPA with Derby embedded is 181 times slower than DataNucleus with H2 server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 server
OpenJPA
Derby embedded
DataNucleus
H2 server
OpenJPA
Derby embedded
DataNucleus
H2 server
OpenJPA
Derby embedded
Basic Person Test4.149.71.39.92.729.8
Element Collection Test4.02.70.499.62.36.1
Inheritance Test2.92.31.51.32.21.8
Indexing Test0.00367.01.517.10.7512.1
Multithreading Test1.340.9failed11.71.326.3
All Tests2.520.51.29.91.915.2

DataNucleus with H2 server has failed in 1 tests (see exceptions).

The results above show that in general OpenJPA with Derby embedded is much more efficient than DataNucleus with H2 server in executing the tested JPA queries. Comparing the normalized speed of DataNucleus with H2 database server (1.9) to the normalized speed of OpenJPA with Derby embedded database (15.2) reveals that in these tests, OpenJPA with Derby embedded is 8.0 times faster than DataNucleus with H2 server.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 server
OpenJPA
Derby embedded
DataNucleus
H2 server
OpenJPA
Derby embedded
DataNucleus
H2 server
OpenJPA
Derby embedded
Basic Person Test2.55.61.45.21.95.4
Element Collection Test2.00.00901.02.21.51.1
Inheritance Test2.40.0452.34.62.32.3
Indexing Test2.76.13.08.72.97.4
Graph (Binary Tree) Test1.81.60.600.911.21.3
Multithreading Testfailed18.3failed4.5failed11.4
All Tests2.35.31.74.42.04.8

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

A large performance gap has been detected when using simple basic entities with large transaction size. Comparing the normalized speed of DataNucleus with H2 database server (1.4) to the normalized speed of OpenJPA with Derby embedded database (5.2) reveals that in that case, OpenJPA with Derby embedded is 3.7 times faster than DataNucleus with H2 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 H2 database server (2.0) reveals that in that case, OpenJPA with Derby embedded is 222 times slower than DataNucleus with H2 server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 server
OpenJPA
Derby embedded
DataNucleus
H2 server
OpenJPA
Derby embedded
DataNucleus
H2 server
OpenJPA
Derby embedded
Basic Person Test3.44.21.34.52.34.3
Element Collection Test1.50.00710.681.61.10.80
Inheritance Test2.70.0351.33.02.01.5
Indexing Test5.75.31.93.63.84.4
Graph (Binary Tree) Test1.50.801.20.931.30.86
Multithreading Testfailed5.75.16.25.16.0
All Tests3.02.71.93.32.43.0

DataNucleus with H2 server has failed in 1 tests (see exceptions).

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

A large performance gap has been detected when using simple basic entities with large transaction size. Comparing the normalized speed of DataNucleus with H2 database server (1.3) to the normalized speed of OpenJPA with Derby embedded database (4.5) reveals that in that case, OpenJPA with Derby embedded is 3.5 times faster than DataNucleus with H2 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 H2 database server (1.5) reveals that in that case, OpenJPA with Derby embedded is 211 times slower than DataNucleus with H2 server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
H2 server
OpenJPA
Derby embedded
DataNucleus
H2 server
OpenJPA
Derby embedded
DataNucleus
H2 server
OpenJPA
Derby embedded
Basic Person Test3.215.82.39.02.712.4
Element Collection Test1.91.10.783.51.32.3
Inheritance Test2.61.32.63.72.62.5
Indexing Test3.27.23.512.03.39.6
Graph (Binary Tree) Test2.81.23.01.12.91.2
Multithreading Test4.519.86.010.95.315.3
All Tests2.98.02.86.92.97.4

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

A large performance gap has been detected when using simple basic entities with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with H2 database server (3.2) to the normalized speed of OpenJPA with Derby embedded database (15.8) reveals that in that case, OpenJPA with Derby embedded is 4.9 times faster than DataNucleus with H2 server.

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using graphs of objects with large transaction/retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (1.1) to the normalized speed of DataNucleus with H2 database server (3.0) reveals that in that case, OpenJPA with Derby embedded is 2.7 times slower than DataNucleus with H2 server.

Other Head to Head DBMS/JPA Comparisons