Compare with

Comparison of EclipseLink with H2 embedded vs OpenJPA with Derby 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
 EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
Basic Person Test25.13.18.92.717.02.9
Element Collection Test20.42.08.01.714.21.8
Inheritance Test28.73.08.72.318.72.6
Indexing Test37.64.714.04.125.84.4
Graph (Binary Tree) Test17.70.7114.70.6416.20.67
Multithreading Test30.36.011.43.820.84.9
All Tests26.63.310.92.518.82.9

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
 EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
Basic Person Test30.40.7829.111.629.76.2
Element Collection Test19.60.002427.61.123.60.54
Inheritance Test33.80.01439.85.036.82.5
Indexing Test22.20.6241.313.031.86.8
Graph (Binary Tree) Test16.00.06520.00.3918.00.23
Multithreading Test33.71.629.019.031.410.3
All Tests25.90.5131.18.428.54.4

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
 EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
Basic Person Test4.429.21.45.52.917.3
Element Collection Test4.12.22.41.43.21.8
Inheritance Test3.42.22.01.02.71.6
Indexing Test13.02.222.811.717.97.0
Multithreading Test1.035.50.678.30.8521.9
All Tests5.214.35.95.65.59.9

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
 EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
Basic Person Test16.61.57.64.012.12.8
Element Collection Test15.30.008110.51.912.90.94
Inheritance Test15.70.0439.83.812.71.9
Indexing Test12.11.89.96.811.04.3
Graph (Binary Tree) Test13.70.167.00.2710.30.22
Multithreading Test20.96.94.25.012.65.9
All Tests15.71.78.23.612.02.7

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
 EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
Basic Person Test35.11.419.63.727.42.5
Element Collection Test19.30.00828.51.413.90.71
Inheritance Test36.00.03514.02.525.01.3
Indexing Test42.52.319.23.530.92.9
Graph (Binary Tree) Test12.20.1314.40.3513.30.24
Multithreading Test54.43.625.84.040.13.8
All Tests33.31.316.92.625.11.9

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
 EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
EclipseLink
H2 embedded
OpenJPA
Derby server
Basic Person Test22.37.213.35.517.86.4
Element Collection Test15.70.8411.41.513.61.2
Inheritance Test23.51.114.92.919.22.0
Indexing Test25.52.321.57.823.55.1
Graph (Binary Tree) Test14.90.2714.00.4114.50.34
Multithreading Test28.110.714.28.021.19.4
All Tests21.93.914.94.518.44.2

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