Compare with

Comparison of DataNucleus with H2 server vs OpenJPA with H2 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
 DataNucleus
H2 server
OpenJPA
H2 server
DataNucleus
H2 server
OpenJPA
H2 server
DataNucleus
H2 server
OpenJPA
H2 server
Basic Person Test3.43.72.22.22.82.9
Element Collection Test1.22.60.641.50.922.1
Inheritance Test3.04.51.92.02.43.2
Indexing Test5.37.33.53.64.45.4
Graph (Binary Tree) Test2.11.11.30.841.70.97
Multithreading Test10.07.74.34.27.25.9
All Tests4.24.52.32.43.23.4

The results above show that in general OpenJPA with H2 server 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 H2 database server (1.5) reveals that in that case, OpenJPA with H2 server is 2.3 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 server
DataNucleus
H2 server
OpenJPA
H2 server
DataNucleus
H2 server
OpenJPA
H2 server
Basic Person Test2.52.95.27.63.95.2
Element Collection Test0.560.00221.11.90.820.93
Inheritance Test2.20.0136.14.04.22.0
Indexing Test2.14.17.78.84.96.5
Graph (Binary Tree) Test5.70.388.90.497.30.44
Multithreading Test2.35.98.714.05.510.0
All Tests2.52.26.36.14.44.2

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

A huge performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with H2 database server (0.0022) to the normalized speed of DataNucleus with H2 database server (0.56) reveals that in that case, DataNucleus with H2 server is 255 times faster than OpenJPA with H2 server.

On the other hand, DataNucleus with H2 server is slower, for instance, 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 database server (5.9) reveals that in that case, DataNucleus with H2 server is 2.6 times slower than OpenJPA 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 server
DataNucleus
H2 server
OpenJPA
H2 server
DataNucleus
H2 server
OpenJPA
H2 server
Basic Person Test4.13.71.31.02.72.4
Element Collection Test4.02.00.491.22.31.6
Inheritance Test2.92.81.51.12.22.0
Indexing Test0.00363.81.57.50.755.7
Multithreading Test1.30.98failed1.01.31.0
All Tests2.52.71.22.41.92.5

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

The results above show that in general OpenJPA with H2 server is more efficient than DataNucleus with H2 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 H2 database server (0.0036) to the normalized speed of OpenJPA with H2 database server (3.8) reveals that in that case, OpenJPA with H2 server is 1,056 times faster than DataNucleus with H2 server.

On the other hand, OpenJPA with H2 server is slower, for instance, when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with H2 database server (2.0) to the normalized speed of DataNucleus with H2 database server (4.0) reveals that in that case, OpenJPA with H2 server is 2.0 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 server
DataNucleus
H2 server
OpenJPA
H2 server
DataNucleus
H2 server
OpenJPA
H2 server
Basic Person Test2.53.01.42.01.92.5
Element Collection Test2.00.00781.01.91.50.94
Inheritance Test2.40.0342.32.82.31.4
Indexing Test2.72.83.03.22.93.0
Graph (Binary Tree) Test1.80.790.600.431.20.61
Multithreading Testfailed7.0failed2.5failed4.8
All Tests2.32.31.72.12.02.2

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

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

On the other hand, OpenJPA with H2 server is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with H2 database server (0.0078) to the normalized speed of DataNucleus with H2 database server (2.0) reveals that in that case, OpenJPA with H2 server is 256 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 server
DataNucleus
H2 server
OpenJPA
H2 server
DataNucleus
H2 server
OpenJPA
H2 server
Basic Person Test3.43.21.32.22.32.7
Element Collection Test1.50.00600.680.881.10.44
Inheritance Test2.70.0301.33.12.01.6
Indexing Test5.76.51.93.63.85.1
Graph (Binary Tree) Test1.50.731.20.751.30.74
Multithreading Testfailed7.65.15.25.16.4
All Tests3.03.01.92.62.42.8

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

The results above show that in general OpenJPA with H2 server 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 class inheritance in the object model with large transaction size. Comparing the normalized speed of DataNucleus with H2 database server (1.3) to the normalized speed of OpenJPA with H2 database server (3.1) reveals that in that case, OpenJPA with H2 server is 2.4 times faster than DataNucleus with H2 server.

On the other hand, OpenJPA with H2 server is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with H2 database server (0.0060) to the normalized speed of DataNucleus with H2 database server (1.5) reveals that in that case, OpenJPA with H2 server is 250 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 server
DataNucleus
H2 server
OpenJPA
H2 server
DataNucleus
H2 server
OpenJPA
H2 server
Basic Person Test3.23.32.33.02.73.1
Element Collection Test1.90.930.781.51.31.2
Inheritance Test2.61.52.62.62.62.0
Indexing Test3.24.93.55.43.35.1
Graph (Binary Tree) Test2.80.753.00.632.90.69
Multithreading Test4.55.96.05.45.35.6
All Tests2.92.92.83.22.93.0

The results above show that in general OpenJPA with H2 server is slightly more efficient than DataNucleus with H2 server in performing JPA database operations.

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

Other Head to Head DBMS/JPA Comparisons