Compare with

Comparison of DataNucleus with Derby embedded vs DataNucleus 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
Derby embedded
DataNucleus
H2 server
DataNucleus
Derby embedded
DataNucleus
H2 server
DataNucleus
Derby embedded
DataNucleus
H2 server
Basic Person Test4.63.42.82.23.72.8
Element Collection Test2.41.21.60.642.00.92
Inheritance Test4.63.02.71.93.72.4
Indexing Test7.65.34.83.56.24.4
Graph (Binary Tree) Test1.62.11.41.31.51.7
Multithreading Test8.610.03.34.35.97.2
All Tests4.94.22.82.33.83.2

The results above show that in general DataNucleus 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 DataNucleus with Derby embedded database (1.6) reveals that in that case, DataNucleus with Derby embedded is 2.5 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
Derby embedded
DataNucleus
H2 server
DataNucleus
Derby embedded
DataNucleus
H2 server
DataNucleus
Derby embedded
DataNucleus
H2 server
Basic Person Test6.82.514.95.210.93.9
Element Collection Test5.40.567.61.16.50.82
Inheritance Test8.82.214.86.111.84.2
Indexing Test9.22.114.17.711.64.9
Graph (Binary Tree) Test9.95.715.88.912.97.3
Multithreading Test11.92.311.58.711.75.5
All Tests8.72.513.16.310.94.4

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
DataNucleus
H2 server
DataNucleus
Derby embedded
DataNucleus
H2 server
DataNucleus
Derby embedded
DataNucleus
H2 server
Basic Person Test39.14.17.51.323.32.7
Element Collection Test46.04.06.70.4926.32.3
Inheritance Test7.72.93.81.55.72.2
Indexing Test0.0530.00368.01.54.00.75
Multithreading Testfailed1.3failedfailedfailed1.3
All Tests23.22.56.51.214.81.9

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

The results above show that in general DataNucleus 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 DataNucleus with Derby embedded database (14.8) reveals that in these tests, DataNucleus with Derby embedded is 7.8 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 DataNucleus with Derby embedded database (0.053) reveals that in that case, DataNucleus with Derby embedded is 14.7 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
Derby embedded
DataNucleus
H2 server
DataNucleus
Derby embedded
DataNucleus
H2 server
DataNucleus
Derby embedded
DataNucleus
H2 server
Basic Person Test4.02.53.81.43.91.9
Element Collection Test3.72.04.51.04.11.5
Inheritance Test4.42.44.82.34.62.3
Indexing Test5.22.74.23.04.72.9
Graph (Binary Tree) Test2.71.81.50.602.11.2
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests4.02.33.71.73.92.0

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

The results above show that in general DataNucleus with Derby embedded is more efficient than DataNucleus with H2 server in updating JPA entity objects in 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 (1.0) to the normalized speed of DataNucleus with Derby embedded database (4.5) reveals that in that case, DataNucleus with Derby embedded is 4.5 times faster than DataNucleus with H2 server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
DataNucleus
H2 server
DataNucleus
Derby embedded
DataNucleus
H2 server
DataNucleus
Derby embedded
DataNucleus
H2 server
Basic Person Test3.53.41.31.32.42.3
Element Collection Test1.91.51.60.681.71.1
Inheritance Test2.42.71.31.31.92.0
Indexing Test6.65.71.91.94.33.8
Graph (Binary Tree) Test0.811.50.931.20.871.3
Multithreading Testfailedfailedfailed5.1failed5.1
All Tests3.03.01.41.92.22.4

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

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

On the other hand, DataNucleus with H2 server is slower, for instance, when using JPA element collections with large transaction size. Comparing the normalized speed of DataNucleus with H2 database server (0.68) to the normalized speed of DataNucleus with Derby embedded database (1.6) reveals that in that case, DataNucleus with H2 server is 2.4 times slower than DataNucleus with Derby embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
DataNucleus
H2 server
DataNucleus
Derby embedded
DataNucleus
H2 server
DataNucleus
Derby embedded
DataNucleus
H2 server
Basic Person Test11.63.26.12.38.82.7
Element Collection Test11.91.94.40.788.11.3
Inheritance Test5.62.65.52.65.52.6
Indexing Test5.73.26.63.56.23.3
Graph (Binary Tree) Test3.72.84.93.04.32.9
Multithreading Test10.34.57.46.08.85.3
All Tests8.02.95.72.86.92.9

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

A large performance gap has been detected when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with H2 database server (1.9) to the normalized speed of DataNucleus with Derby embedded database (11.9) reveals that in that case, DataNucleus with Derby embedded is 6.3 times faster than DataNucleus with H2 server.

Other Head to Head DBMS/JPA Comparisons