Compare with

Comparison of EclipseLink with Derby server vs OpenJPA with H2 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
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
Basic Person Test3.83.73.12.23.42.9
Element Collection Test2.22.61.51.51.82.1
Inheritance Test3.94.52.92.03.43.2
Indexing Test5.27.34.33.64.75.4
Graph (Binary Tree) Test1.91.11.70.841.80.97
Multithreading Test6.17.73.94.25.05.9
All Tests3.84.52.92.43.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
 EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
Basic Person Test6.42.911.37.68.85.2
Element Collection Test1.80.00222.41.92.10.93
Inheritance Test3.70.01312.94.08.32.0
Indexing Test3.64.112.88.88.26.5
Graph (Binary Tree) Test0.610.380.730.490.670.44
Multithreading Test8.55.919.814.014.110.0
All Tests4.12.210.06.17.04.2

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
 EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
Basic Person Test45.83.75.31.025.62.4
Element Collection Test35.22.00.991.218.11.6
Inheritance Test23.12.85.91.114.52.0
Indexing Test2.53.812.27.57.45.7
Multithreading Test34.30.987.71.021.01.0
All Tests28.22.76.42.417.32.5

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
 EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
Basic Person Test3.93.04.42.04.12.5
Element Collection Test1.70.00781.61.91.60.94
Inheritance Test4.60.0346.12.85.31.4
Indexing Test4.52.87.63.26.13.0
Graph (Binary Tree) Test0.700.790.420.430.560.61
Multithreading Test7.37.04.82.56.04.8
All Tests3.82.34.22.14.02.2

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
 EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
Basic Person Test2.83.23.92.23.32.7
Element Collection Test1.20.00600.550.880.870.44
Inheritance Test3.30.0303.73.13.51.6
Indexing Test4.96.53.53.64.25.1
Graph (Binary Tree) Test0.510.730.500.750.510.74
Multithreading Test4.87.65.75.25.36.4
All Tests2.93.03.02.63.02.8

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
 EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
EclipseLink
Derby server
OpenJPA
H2 server
Basic Person Test12.53.35.63.09.13.1
Element Collection Test8.40.931.41.54.91.2
Inheritance Test7.71.56.32.67.02.0
Indexing Test4.14.98.15.46.15.1
Graph (Binary Tree) Test0.930.750.830.630.880.69
Multithreading Test12.25.98.45.410.35.6
All Tests7.92.95.23.26.63.0

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