Compare with

Comparison of DataNucleus with H2 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
H2 server
OpenJPA
HSQLDB embedded
DataNucleus
H2 server
OpenJPA
HSQLDB embedded
DataNucleus
H2 server
OpenJPA
HSQLDB embedded
Basic Person Test3.413.32.26.92.810.1
Element Collection Test1.28.60.645.30.927.0
Inheritance Test3.012.21.95.82.49.0
Indexing Test5.316.73.59.14.412.9
Graph (Binary Tree) Test2.16.11.37.31.76.7
Multithreading Test10.026.84.37.07.216.9
All Tests4.213.92.36.93.210.4

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

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 HSQLDB embedded database (5.3) reveals that in that case, OpenJPA with HSQLDB embedded is 8.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
HSQLDB embedded
DataNucleus
H2 server
OpenJPA
HSQLDB embedded
DataNucleus
H2 server
OpenJPA
HSQLDB embedded
Basic Person Test2.521.85.230.13.925.9
Element Collection Test0.560.00681.14.50.822.2
Inheritance Test2.20.00256.12.04.20.98
Indexing Test2.122.17.743.64.932.9
Graph (Binary Tree) Test5.72.18.92.17.32.1
Multithreading Test2.320.98.723.55.522.2
All Tests2.511.16.317.64.414.4

The results above show that in general OpenJPA with HSQLDB embedded is much 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 HSQLDB embedded database (14.4) reveals that in these tests, OpenJPA with HSQLDB embedded is 3.3 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 (2.1) to the normalized speed of OpenJPA with HSQLDB embedded database (22.1) reveals that in that case, OpenJPA with HSQLDB embedded is 10.5 times faster than DataNucleus with H2 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 H2 database server (2.2) reveals that in that case, OpenJPA with HSQLDB embedded is 880 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
HSQLDB embedded
DataNucleus
H2 server
OpenJPA
HSQLDB embedded
DataNucleus
H2 server
OpenJPA
HSQLDB embedded
Basic Person Test4.12.81.30.912.71.9
Element Collection Test4.01.40.490.952.31.2
Inheritance Test2.92.41.51.32.21.8
Indexing Test0.003615.41.534.30.7524.9
Multithreading Test1.31.4failed0.531.30.95
All Tests2.54.71.27.61.96.1

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

The results above show that in general OpenJPA with HSQLDB 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 HSQLDB embedded database (6.1) reveals that in these tests, OpenJPA with HSQLDB embedded is 3.2 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 HSQLDB embedded database (15.4) reveals that in that case, OpenJPA with HSQLDB embedded is 4,278 times faster than DataNucleus with H2 server.

On the other hand, OpenJPA with HSQLDB embedded is slower, for instance, 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 H2 database server (4.0) reveals that in that case, OpenJPA with HSQLDB embedded is 2.9 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
HSQLDB embedded
DataNucleus
H2 server
OpenJPA
HSQLDB embedded
DataNucleus
H2 server
OpenJPA
HSQLDB embedded
Basic Person Test2.512.01.45.31.98.6
Element Collection Test2.00.0171.03.71.51.8
Inheritance Test2.40.00982.32.02.30.99
Indexing Test2.79.33.05.52.97.4
Graph (Binary Tree) Test1.82.50.601.61.22.1
Multithreading Testfailed20.0failed3.7failed11.8
All Tests2.37.31.73.62.05.5

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

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

A large performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with H2 database server (2.5) to the normalized speed of OpenJPA with HSQLDB embedded database (12.0) reveals that in that case, OpenJPA with HSQLDB embedded is 4.8 times faster than DataNucleus with H2 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 H2 database server (2.4) reveals that in that case, OpenJPA with HSQLDB embedded is 245 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
HSQLDB embedded
DataNucleus
H2 server
OpenJPA
HSQLDB embedded
DataNucleus
H2 server
OpenJPA
HSQLDB embedded
Basic Person Test3.421.31.315.72.318.5
Element Collection Test1.50.0110.682.91.11.5
Inheritance Test2.70.00701.33.52.01.8
Indexing Test5.728.81.915.23.822.0
Graph (Binary Tree) Test1.52.91.23.61.33.2
Multithreading Testfailed26.05.119.65.122.8
All Tests3.013.21.910.12.411.6

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

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

A huge 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 HSQLDB embedded database (15.7) reveals that in that case, OpenJPA with HSQLDB embedded is 12.1 times faster than DataNucleus with H2 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 H2 database server (2.7) reveals that in that case, OpenJPA with HSQLDB embedded is 386 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
HSQLDB embedded
DataNucleus
H2 server
OpenJPA
HSQLDB embedded
DataNucleus
H2 server
OpenJPA
HSQLDB embedded
Basic Person Test3.214.32.311.82.713.0
Element Collection Test1.92.00.783.51.32.7
Inheritance Test2.62.92.62.92.62.9
Indexing Test3.218.53.521.63.320.0
Graph (Binary Tree) Test2.83.43.03.72.93.5
Multithreading Test4.519.06.010.95.314.9
All Tests2.910.22.89.22.99.7

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

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

Other Head to Head DBMS/JPA Comparisons