Compare with

Comparison of EclipseLink with Derby embedded vs DataNucleus 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
 EclipseLink
Derby embedded
DataNucleus
H2 embedded
EclipseLink
Derby embedded
DataNucleus
H2 embedded
EclipseLink
Derby embedded
DataNucleus
H2 embedded
Basic Person Test5.519.23.78.04.613.6
Element Collection Test3.06.61.72.82.44.7
Inheritance Test5.315.63.54.44.410.0
Indexing Test6.924.44.611.85.818.1
Graph (Binary Tree) Test2.09.21.96.21.97.7
Multithreading Test9.334.94.17.16.721.0
All Tests5.318.33.26.74.312.5

The results above show that in general DataNucleus with H2 embedded is more efficient than EclipseLink with Derby embedded in persisting JPA entity objects to the database. Comparing the normalized speed of EclipseLink with Derby embedded database (4.3) to the normalized speed of DataNucleus with H2 embedded database (12.5) reveals that in these tests, DataNucleus with H2 embedded is 2.9 times faster than EclipseLink with Derby embedded.

A large performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of EclipseLink with Derby embedded database (2.0) to the normalized speed of DataNucleus with H2 embedded database (9.2) reveals that in that case, DataNucleus with H2 embedded is 4.6 times faster than EclipseLink with Derby embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
DataNucleus
H2 embedded
EclipseLink
Derby embedded
DataNucleus
H2 embedded
EclipseLink
Derby embedded
DataNucleus
H2 embedded
Basic Person Test16.413.258.713.537.513.3
Element Collection Test7.56.413.38.910.47.7
Inheritance Test17.112.258.912.738.012.4
Indexing Test14.28.167.416.540.812.3
Graph (Binary Tree) Test2.810.65.720.94.215.8
Multithreading Test28.013.348.79.938.411.6
All Tests14.310.642.113.728.212.2

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

A large performance gap has been detected when using multithreading with large retrieval size. Comparing the normalized speed of DataNucleus with H2 embedded database (9.9) to the normalized speed of EclipseLink with Derby embedded database (48.7) reveals that in that case, EclipseLink with Derby embedded is 4.9 times faster than DataNucleus with H2 embedded.

On the other hand, EclipseLink with Derby embedded is slower, for instance, when using graphs of objects with small retrieval size. Comparing the normalized speed of EclipseLink with Derby embedded database (2.8) to the normalized speed of DataNucleus with H2 embedded database (10.6) reveals that in that case, EclipseLink with Derby embedded is 3.8 times slower than DataNucleus with H2 embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
DataNucleus
H2 embedded
EclipseLink
Derby embedded
DataNucleus
H2 embedded
EclipseLink
Derby embedded
DataNucleus
H2 embedded
Basic Person Test53.44.713.81.433.63.1
Element Collection Test37.95.04.42.421.23.7
Inheritance Test37.43.815.01.626.22.7
Indexing Test7.60.004149.31.828.40.91
Multithreading Test41.21.26.10.7923.61.0
All Tests35.53.017.71.626.62.3

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
DataNucleus
H2 embedded
EclipseLink
Derby embedded
DataNucleus
H2 embedded
EclipseLink
Derby embedded
DataNucleus
H2 embedded
Basic Person Test6.410.06.73.96.56.9
Element Collection Test5.47.66.23.95.85.8
Inheritance Test6.59.49.24.47.86.9
Indexing Test7.310.611.15.99.28.2
Graph (Binary Tree) Test2.85.91.73.72.24.8
Multithreading Test21.3failed5.0failed13.1failed
All Tests8.38.76.64.47.56.5

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

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

On the other hand, EclipseLink with Derby embedded is slower, for instance, when using graphs of objects with large transaction size. Comparing the normalized speed of EclipseLink with Derby embedded database (1.7) to the normalized speed of DataNucleus with H2 embedded database (3.7) reveals that in that case, EclipseLink with Derby embedded is 2.2 times slower than DataNucleus with H2 embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
DataNucleus
H2 embedded
EclipseLink
Derby embedded
DataNucleus
H2 embedded
EclipseLink
Derby embedded
DataNucleus
H2 embedded
Basic Person Test4.64.24.71.34.62.8
Element Collection Test2.54.91.41.61.93.2
Inheritance Test3.94.04.51.34.22.7
Indexing Test6.27.53.81.95.04.7
Graph (Binary Tree) Test1.15.61.04.11.14.8
Multithreading Test6.2failed5.8failed6.0failed
All Tests4.15.23.52.03.83.6

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

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

On the other hand, EclipseLink with Derby embedded is slower, for instance, when using graphs of objects with small transaction size. Comparing the normalized speed of EclipseLink with Derby embedded database (1.1) to the normalized speed of DataNucleus with H2 embedded database (5.6) reveals that in that case, EclipseLink with Derby embedded is 5.1 times slower than DataNucleus with H2 embedded.

Comparison of database storage efficiency (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
DataNucleus
H2 embedded
EclipseLink
Derby embedded
DataNucleus
H2 embedded
EclipseLink
Derby embedded
DataNucleus
H2 embedded
Basic Person Test51.127.051.027.051.127.0
Element Collection Test38.522.439.422.438.922.4
Inheritance Test48.027.047.927.048.027.0
Indexing Test51.631.652.332.152.031.9
Graph (Binary Tree) Test13.420.011.715.012.617.5
Multithreading Test52.633.98.49.230.521.5
All Tests42.527.035.122.138.824.6

The results above show that in general EclipseLink with Derby embedded is more efficient than DataNucleus with H2 embedded in using disk space.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
DataNucleus
H2 embedded
EclipseLink
Derby embedded
DataNucleus
H2 embedded
EclipseLink
Derby embedded
DataNucleus
H2 embedded
Basic Person Test17.310.317.55.617.47.9
Element Collection Test11.36.15.43.98.35.0
Inheritance Test14.09.018.24.916.16.9
Indexing Test8.410.127.27.617.88.9
Graph (Binary Tree) Test2.27.82.68.72.48.3
Multithreading Test21.216.513.95.917.611.2
All Tests12.79.614.56.013.67.8

The results above show that in general EclipseLink with Derby embedded is more efficient than DataNucleus with H2 embedded in performing JPA database operations.

A large performance gap has been detected when using class inheritance in the object model with large transaction/retrieval size. Comparing the normalized speed of DataNucleus with H2 embedded database (4.9) to the normalized speed of EclipseLink with Derby embedded database (18.2) reveals that in that case, EclipseLink with Derby embedded is 3.7 times faster than DataNucleus with H2 embedded.

On the other hand, EclipseLink with Derby embedded is slower, for instance, when using graphs of objects with small transaction/retrieval size. Comparing the normalized speed of EclipseLink with Derby embedded database (2.2) to the normalized speed of DataNucleus with H2 embedded database (7.8) reveals that in that case, EclipseLink with Derby embedded is 3.5 times slower than DataNucleus with H2 embedded.

Other Head to Head DBMS/JPA Comparisons