Compare with

Comparison of DataNucleus with H2 server vs OpenJPA with H2 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
H2 embedded
DataNucleus
H2 server
OpenJPA
H2 embedded
DataNucleus
H2 server
OpenJPA
H2 embedded
Basic Person Test3.417.12.25.82.811.5
Element Collection Test1.210.90.644.90.927.9
Inheritance Test3.014.31.95.92.410.1
Indexing Test5.324.43.513.74.419.1
Graph (Binary Tree) Test2.16.81.36.71.76.7
Multithreading Test10.034.24.310.27.222.2
All Tests4.217.92.37.93.212.9

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

A large performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of DataNucleus with H2 database server (1.2) to the normalized speed of OpenJPA with H2 embedded database (10.9) reveals that in that case, OpenJPA with H2 embedded is 9.1 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
H2 embedded
DataNucleus
H2 server
OpenJPA
H2 embedded
DataNucleus
H2 server
OpenJPA
H2 embedded
Basic Person Test2.514.65.227.23.920.9
Element Collection Test0.560.00461.14.30.822.1
Inheritance Test2.20.0116.17.44.23.7
Indexing Test2.117.07.735.04.926.0
Graph (Binary Tree) Test5.71.08.91.47.31.2
Multithreading Test2.318.78.727.65.523.1
All Tests2.58.66.317.14.412.8

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

A large 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 H2 embedded database (18.7) reveals that in that case, OpenJPA with H2 embedded is 8.1 times faster than DataNucleus with H2 server.

On the other hand, OpenJPA with H2 embedded is slower, for instance, when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of OpenJPA with H2 embedded database (0.011) to the normalized speed of DataNucleus with H2 database server (2.2) reveals that in that case, OpenJPA with H2 embedded is 200 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
H2 embedded
DataNucleus
H2 server
OpenJPA
H2 embedded
DataNucleus
H2 server
OpenJPA
H2 embedded
Basic Person Test4.15.01.31.12.73.1
Element Collection Test4.01.70.491.32.31.5
Inheritance Test2.92.21.51.22.21.7
Indexing Test0.003613.81.523.20.7518.5
Multithreading Test1.31.4failed0.601.30.99
All Tests2.54.81.25.51.95.1

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

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

On the other hand, OpenJPA with H2 embedded is slower, for instance, when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with H2 embedded database (1.7) to the normalized speed of DataNucleus with H2 database server (4.0) reveals that in that case, OpenJPA with H2 embedded is 2.4 times slower 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
H2 embedded
DataNucleus
H2 server
OpenJPA
H2 embedded
DataNucleus
H2 server
OpenJPA
H2 embedded
Basic Person Test2.510.01.46.01.98.0
Element Collection Test2.00.0111.03.81.51.9
Inheritance Test2.40.0462.35.02.32.5
Indexing Test2.78.93.07.02.98.0
Graph (Binary Tree) Test1.82.40.601.31.21.9
Multithreading Testfailed16.6failed4.3failed10.4
All Tests2.36.31.74.62.05.4

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

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

On the other hand, OpenJPA with H2 embedded is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with H2 embedded database (0.011) to the normalized speed of DataNucleus with H2 database server (2.0) reveals that in that case, OpenJPA with H2 embedded is 182 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
H2 embedded
DataNucleus
H2 server
OpenJPA
H2 embedded
DataNucleus
H2 server
OpenJPA
H2 embedded
Basic Person Test3.418.31.311.12.314.7
Element Collection Test1.50.0120.682.91.11.4
Inheritance Test2.70.0301.36.62.03.3
Indexing Test5.723.21.99.73.816.4
Graph (Binary Tree) Test1.51.81.22.41.32.1
Multithreading Testfailed31.25.117.35.124.2
All Tests3.012.41.98.32.410.4

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

The results above show that in general OpenJPA with H2 embedded is much more efficient than DataNucleus with H2 server in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with H2 database server (2.4) to the normalized speed of OpenJPA with H2 embedded database (10.4) reveals that in these tests, OpenJPA with H2 embedded is 4.3 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.3) to the normalized speed of OpenJPA with H2 embedded database (11.1) reveals that in that case, OpenJPA with H2 embedded is 8.5 times faster than DataNucleus with H2 server.

On the other hand, OpenJPA with H2 embedded is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with H2 embedded database (0.012) to the normalized speed of DataNucleus with H2 database server (1.5) reveals that in that case, OpenJPA with H2 embedded is 125 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
H2 embedded
DataNucleus
H2 server
OpenJPA
H2 embedded
DataNucleus
H2 server
OpenJPA
H2 embedded
Basic Person Test3.213.02.310.22.711.6
Element Collection Test1.92.50.783.41.33.0
Inheritance Test2.63.32.65.22.64.3
Indexing Test3.217.53.517.73.317.6
Graph (Binary Tree) Test2.83.03.03.02.93.0
Multithreading Test4.520.46.012.05.316.2
All Tests2.910.22.88.82.99.5

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

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

Other Head to Head DBMS/JPA Comparisons