Compare with

Comparison of EclipseLink with H2 embedded vs OpenJPA with Derby 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
H2 embedded
OpenJPA
Derby embedded
EclipseLink
H2 embedded
OpenJPA
Derby embedded
EclipseLink
H2 embedded
OpenJPA
Derby embedded
Basic Person Test25.14.88.92.917.03.9
Element Collection Test20.42.88.01.914.22.4
Inheritance Test28.74.18.72.418.73.3
Indexing Test37.66.114.04.125.85.1
Graph (Binary Tree) Test17.71.514.71.416.21.4
Multithreading Test30.38.711.43.320.86.0
All Tests26.64.710.92.718.83.7

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
OpenJPA
Derby embedded
EclipseLink
H2 embedded
OpenJPA
Derby embedded
EclipseLink
H2 embedded
OpenJPA
Derby embedded
Basic Person Test30.414.829.122.629.718.7
Element Collection Test19.60.003127.62.323.61.2
Inheritance Test33.80.01539.87.036.83.5
Indexing Test22.211.741.326.531.819.1
Graph (Binary Tree) Test16.00.9320.01.218.01.1
Multithreading Test33.725.229.028.631.426.9
All Tests25.98.831.114.728.511.7

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

A huge performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0031) to the normalized speed of EclipseLink with H2 embedded database (19.6) reveals that in that case, EclipseLink with H2 embedded is 6,323 times faster than OpenJPA with Derby embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
OpenJPA
Derby embedded
EclipseLink
H2 embedded
OpenJPA
Derby embedded
EclipseLink
H2 embedded
OpenJPA
Derby embedded
Basic Person Test4.449.71.49.92.929.8
Element Collection Test4.12.72.49.63.26.1
Inheritance Test3.42.32.01.32.71.8
Indexing Test13.07.022.817.117.912.1
Multithreading Test1.040.90.6711.70.8526.3
All Tests5.220.55.99.95.515.2

The results above show that in general OpenJPA with Derby embedded is 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 OpenJPA with Derby embedded database (15.2) reveals that in these tests, OpenJPA with Derby embedded is 2.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 OpenJPA with Derby embedded database (40.9) reveals that in that case, OpenJPA with Derby embedded is 40.9 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
H2 embedded
OpenJPA
Derby embedded
EclipseLink
H2 embedded
OpenJPA
Derby embedded
EclipseLink
H2 embedded
OpenJPA
Derby embedded
Basic Person Test16.65.67.65.212.15.4
Element Collection Test15.30.009010.52.212.91.1
Inheritance Test15.70.0459.84.612.72.3
Indexing Test12.16.19.98.711.07.4
Graph (Binary Tree) Test13.71.67.00.9110.31.3
Multithreading Test20.918.34.24.512.611.4
All Tests15.75.38.24.412.04.8

The results above show that in general EclipseLink with H2 embedded is more efficient than OpenJPA with Derby embedded in updating JPA entity objects in the database. Comparing the normalized speed of OpenJPA with Derby embedded database (4.8) to the normalized speed of EclipseLink with H2 embedded database (12.0) reveals that in these tests, EclipseLink with H2 embedded is 2.5 times faster than OpenJPA with Derby embedded.

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0090) to the normalized speed of EclipseLink with H2 embedded database (15.3) reveals that in that case, EclipseLink with H2 embedded is 1,700 times faster than OpenJPA with Derby embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
OpenJPA
Derby embedded
EclipseLink
H2 embedded
OpenJPA
Derby embedded
EclipseLink
H2 embedded
OpenJPA
Derby embedded
Basic Person Test35.14.219.64.527.44.3
Element Collection Test19.30.00718.51.613.90.80
Inheritance Test36.00.03514.03.025.01.5
Indexing Test42.55.319.23.630.94.4
Graph (Binary Tree) Test12.20.8014.40.9313.30.86
Multithreading Test54.45.725.86.240.16.0
All Tests33.32.716.93.325.13.0

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

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0071) to the normalized speed of EclipseLink with H2 embedded database (19.3) reveals that in that case, EclipseLink with H2 embedded is 2,718 times faster than OpenJPA with Derby embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
OpenJPA
Derby embedded
EclipseLink
H2 embedded
OpenJPA
Derby embedded
EclipseLink
H2 embedded
OpenJPA
Derby embedded
Basic Person Test36.252.839.252.837.752.8
Element Collection Test33.342.434.942.434.142.4
Inheritance Test35.444.236.244.235.844.2
Indexing Test39.853.143.754.041.753.5
Graph (Binary Tree) Test41.012.828.49.634.711.2
Multithreading Test48.750.712.49.730.630.2
All Tests39.142.732.535.535.839.1

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

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using graphs of objects with small transaction size. Comparing the normalized score of OpenJPA with Derby embedded database (12.8) to the normalized score of EclipseLink with H2 embedded database (41.0) reveals that in that case, OpenJPA with Derby embedded is 3.2 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
H2 embedded
OpenJPA
Derby embedded
EclipseLink
H2 embedded
OpenJPA
Derby embedded
EclipseLink
H2 embedded
OpenJPA
Derby embedded
Basic Person Test22.315.813.39.017.812.4
Element Collection Test15.71.111.43.513.62.3
Inheritance Test23.51.314.93.719.22.5
Indexing Test25.57.221.512.023.59.6
Graph (Binary Tree) Test14.91.214.01.114.51.2
Multithreading Test28.119.814.210.921.115.3
All Tests21.98.014.96.918.47.4

The results above show that in general EclipseLink with H2 embedded is more efficient than OpenJPA with Derby embedded in performing JPA database operations. Comparing the normalized speed of OpenJPA with Derby embedded database (7.4) to the normalized speed of EclipseLink with H2 embedded database (18.4) reveals that in these tests, EclipseLink with H2 embedded is 2.5 times faster than OpenJPA with Derby embedded.

A huge performance gap has been detected when using class inheritance in the object model with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (1.3) to the normalized speed of EclipseLink with H2 embedded database (23.5) reveals that in that case, EclipseLink with H2 embedded is 18.1 times faster than OpenJPA with Derby embedded.

Other Head to Head DBMS/JPA Comparisons