Compare with

Comparison of OpenJPA with H2 server vs EclipseLink 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
 OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
Basic Person Test3.73.82.23.12.93.4
Element Collection Test2.62.21.51.52.11.8
Inheritance Test4.53.92.02.93.23.4
Indexing Test7.35.23.64.35.44.7
Graph (Binary Tree) Test1.11.90.841.70.971.8
Multithreading Test7.76.14.23.95.95.0
All Tests4.53.82.42.93.43.4

The results above show that in general OpenJPA with H2 server is equivalent to EclipseLink with Derby server in persisting JPA entity objects to the database.

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
Basic Person Test2.96.47.611.35.28.8
Element Collection Test0.00221.81.92.40.932.1
Inheritance Test0.0133.74.012.92.08.3
Indexing Test4.13.68.812.86.58.2
Graph (Binary Tree) Test0.380.610.490.730.440.67
Multithreading Test5.98.514.019.810.014.1
All Tests2.24.16.110.04.27.0

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
Basic Person Test3.745.81.05.32.425.6
Element Collection Test2.035.21.20.991.618.1
Inheritance Test2.823.11.15.92.014.5
Indexing Test3.82.57.512.25.77.4
Multithreading Test0.9834.31.07.71.021.0
All Tests2.728.22.46.42.517.3

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
Basic Person Test3.03.92.04.42.54.1
Element Collection Test0.00781.71.91.60.941.6
Inheritance Test0.0344.62.86.11.45.3
Indexing Test2.84.53.27.63.06.1
Graph (Binary Tree) Test0.790.700.430.420.610.56
Multithreading Test7.07.32.54.84.86.0
All Tests2.33.82.14.22.24.0

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
Basic Person Test3.22.82.23.92.73.3
Element Collection Test0.00601.20.880.550.440.87
Inheritance Test0.0303.33.13.71.63.5
Indexing Test6.54.93.63.55.14.2
Graph (Binary Tree) Test0.730.510.750.500.740.51
Multithreading Test7.64.85.25.76.45.3
All Tests3.02.92.63.02.83.0

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

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
Basic Person Test3.312.53.05.63.19.1
Element Collection Test0.938.41.51.41.24.9
Inheritance Test1.57.72.66.32.07.0
Indexing Test4.94.15.48.15.16.1
Graph (Binary Tree) Test0.750.930.630.830.690.88
Multithreading Test5.912.25.48.45.610.3
All Tests2.97.93.25.23.06.6

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

A large performance gap has been detected when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with H2 database server (0.93) to the normalized speed of EclipseLink with Derby database server (8.4) reveals that in that case, EclipseLink with Derby server is 9.0 times faster than OpenJPA with H2 server.

Other Head to Head DBMS/JPA Comparisons