Compare with

Comparison of EclipseLink with Derby embedded vs EclipseLink 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
EclipseLink
H2 embedded
EclipseLink
Derby embedded
EclipseLink
H2 embedded
EclipseLink
Derby embedded
EclipseLink
H2 embedded
Basic Person Test5.525.13.78.94.617.0
Element Collection Test3.020.41.78.02.414.2
Inheritance Test5.328.73.58.74.418.7
Indexing Test6.937.64.614.05.825.8
Graph (Binary Tree) Test2.017.71.914.71.916.2
Multithreading Test9.330.34.111.46.720.8
All Tests5.326.63.210.94.318.8

The results above show that in general EclipseLink with H2 embedded is much 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 EclipseLink with H2 embedded database (18.8) reveals that in these tests, EclipseLink with H2 embedded is 4.4 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 EclipseLink with H2 embedded database (17.7) reveals that in that case, EclipseLink with H2 embedded is 8.8 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
EclipseLink
H2 embedded
EclipseLink
Derby embedded
EclipseLink
H2 embedded
EclipseLink
Derby embedded
EclipseLink
H2 embedded
Basic Person Test16.430.458.729.137.529.7
Element Collection Test7.519.613.327.610.423.6
Inheritance Test17.133.858.939.838.036.8
Indexing Test14.222.267.441.340.831.8
Graph (Binary Tree) Test2.816.05.720.04.218.0
Multithreading Test28.033.748.729.038.431.4
All Tests14.325.942.131.128.228.5

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

A large performance gap has been detected 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 EclipseLink with H2 embedded database (16.0) reveals that in that case, EclipseLink with H2 embedded is 5.7 times faster than EclipseLink with Derby embedded.

On the other hand, EclipseLink with H2 embedded is slower, for instance, when using simple basic entities with large retrieval size. Comparing the normalized speed of EclipseLink with H2 embedded database (29.1) to the normalized speed of EclipseLink with Derby embedded database (58.7) reveals that in that case, EclipseLink with H2 embedded is 2.0 times slower than EclipseLink with Derby embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
EclipseLink
H2 embedded
EclipseLink
Derby embedded
EclipseLink
H2 embedded
EclipseLink
Derby embedded
EclipseLink
H2 embedded
Basic Person Test53.44.413.81.433.62.9
Element Collection Test37.94.14.42.421.23.2
Inheritance Test37.43.415.02.026.22.7
Indexing Test7.613.049.322.828.417.9
Multithreading Test41.21.06.10.6723.60.85
All Tests35.55.217.75.926.65.5

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
EclipseLink
H2 embedded
EclipseLink
Derby embedded
EclipseLink
H2 embedded
EclipseLink
Derby embedded
EclipseLink
H2 embedded
Basic Person Test6.416.66.77.66.512.1
Element Collection Test5.415.36.210.55.812.9
Inheritance Test6.515.79.29.87.812.7
Indexing Test7.312.111.19.99.211.0
Graph (Binary Tree) Test2.813.71.77.02.210.3
Multithreading Test21.320.95.04.213.112.6
All Tests8.315.76.68.27.512.0

The results above show that in general EclipseLink with H2 embedded is more efficient than EclipseLink with Derby embedded in updating JPA entity objects in the database.

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.8) to the normalized speed of EclipseLink with H2 embedded database (13.7) reveals that in that case, EclipseLink with H2 embedded is 4.9 times faster than EclipseLink with Derby embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
EclipseLink
H2 embedded
EclipseLink
Derby embedded
EclipseLink
H2 embedded
EclipseLink
Derby embedded
EclipseLink
H2 embedded
Basic Person Test4.635.14.719.64.627.4
Element Collection Test2.519.31.48.51.913.9
Inheritance Test3.936.04.514.04.225.0
Indexing Test6.242.53.819.25.030.9
Graph (Binary Tree) Test1.112.21.014.41.113.3
Multithreading Test6.254.45.825.86.040.1
All Tests4.133.33.516.93.825.1

The results above show that in general EclipseLink with H2 embedded is much more efficient than EclipseLink with Derby embedded in deleting JPA entity objects from the database. Comparing the normalized speed of EclipseLink with Derby embedded database (3.8) to the normalized speed of EclipseLink with H2 embedded database (25.1) reveals that in these tests, EclipseLink with H2 embedded is 6.6 times faster than EclipseLink with Derby embedded.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
EclipseLink
H2 embedded
EclipseLink
Derby embedded
EclipseLink
H2 embedded
EclipseLink
Derby embedded
EclipseLink
H2 embedded
Basic Person Test51.136.251.039.251.137.7
Element Collection Test38.533.339.434.938.934.1
Inheritance Test48.035.447.936.248.035.8
Indexing Test51.639.852.343.752.041.7
Graph (Binary Tree) Test13.441.011.728.412.634.7
Multithreading Test52.648.78.412.430.530.6
All Tests42.539.135.132.538.835.8

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

On the other hand, EclipseLink with Derby embedded is slower, for instance, when using graphs of objects with small transaction size. Comparing the normalized score of EclipseLink with Derby embedded database (13.4) to the normalized score of EclipseLink with H2 embedded database (41.0) reveals that in that case, EclipseLink with Derby embedded is 3.1 times less efficient than EclipseLink with H2 embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
EclipseLink
H2 embedded
EclipseLink
Derby embedded
EclipseLink
H2 embedded
EclipseLink
Derby embedded
EclipseLink
H2 embedded
Basic Person Test17.322.317.513.317.417.8
Element Collection Test11.315.75.411.48.313.6
Inheritance Test14.023.518.214.916.119.2
Indexing Test8.425.527.221.517.823.5
Graph (Binary Tree) Test2.214.92.614.02.414.5
Multithreading Test21.228.113.914.217.621.1
All Tests12.721.914.514.913.618.4

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

A large performance gap has been detected 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 EclipseLink with H2 embedded database (14.9) reveals that in that case, EclipseLink with H2 embedded is 6.8 times faster than EclipseLink with Derby embedded.

Other Head to Head DBMS/JPA Comparisons