Compare with

Comparison of OpenJPA with Derby server 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
 OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
Basic Person Test3.125.12.78.92.917.0
Element Collection Test2.020.41.78.01.814.2
Inheritance Test3.028.72.38.72.618.7
Indexing Test4.737.64.114.04.425.8
Graph (Binary Tree) Test0.7117.70.6414.70.6716.2
Multithreading Test6.030.33.811.44.920.8
All Tests3.326.62.510.92.918.8

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
Basic Person Test0.7830.411.629.16.229.7
Element Collection Test0.002419.61.127.60.5423.6
Inheritance Test0.01433.85.039.82.536.8
Indexing Test0.6222.213.041.36.831.8
Graph (Binary Tree) Test0.06516.00.3920.00.2318.0
Multithreading Test1.633.719.029.010.331.4
All Tests0.5125.98.431.14.428.5

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
Basic Person Test29.24.45.51.417.32.9
Element Collection Test2.24.11.42.41.83.2
Inheritance Test2.23.41.02.01.62.7
Indexing Test2.213.011.722.87.017.9
Multithreading Test35.51.08.30.6721.90.85
All Tests14.35.25.65.99.95.5

The results above show that in general OpenJPA with Derby server is more efficient than EclipseLink with H2 embedded in executing the tested JPA queries.

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 database server (35.5) reveals that in that case, OpenJPA with Derby server is 35.5 times faster than EclipseLink with H2 embedded.

On the other hand, OpenJPA with Derby server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of OpenJPA with Derby database server (2.2) to the normalized speed of EclipseLink with H2 embedded database (13.0) reveals that in that case, OpenJPA with Derby server is 5.9 times slower than EclipseLink with H2 embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
Basic Person Test1.516.64.07.62.812.1
Element Collection Test0.008115.31.910.50.9412.9
Inheritance Test0.04315.73.89.81.912.7
Indexing Test1.812.16.89.94.311.0
Graph (Binary Tree) Test0.1613.70.277.00.2210.3
Multithreading Test6.920.95.04.25.912.6
All Tests1.715.73.68.22.712.0

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
Basic Person Test1.435.13.719.62.527.4
Element Collection Test0.008219.31.48.50.7113.9
Inheritance Test0.03536.02.514.01.325.0
Indexing Test2.342.53.519.22.930.9
Graph (Binary Tree) Test0.1312.20.3514.40.2413.3
Multithreading Test3.654.44.025.83.840.1
All Tests1.333.32.616.91.925.1

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

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
Basic Person Test7.222.35.513.36.417.8
Element Collection Test0.8415.71.511.41.213.6
Inheritance Test1.123.52.914.92.019.2
Indexing Test2.325.57.821.55.123.5
Graph (Binary Tree) Test0.2714.90.4114.00.3414.5
Multithreading Test10.728.18.014.29.421.1
All Tests3.921.94.514.94.218.4

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

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

Other Head to Head DBMS/JPA Comparisons