Compare with

Comparison of EclipseLink with H2 embedded 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
H2 embedded
OpenJPA
H2 server
EclipseLink
H2 embedded
OpenJPA
H2 server
EclipseLink
H2 embedded
OpenJPA
H2 server
Basic Person Test25.13.78.92.217.02.9
Element Collection Test20.42.68.01.514.22.1
Inheritance Test28.74.58.72.018.73.2
Indexing Test37.67.314.03.625.85.4
Graph (Binary Tree) Test17.71.114.70.8416.20.97
Multithreading Test30.37.711.44.220.85.9
All Tests26.64.510.92.418.83.4

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

A huge performance gap has been detected 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 H2 embedded database (14.7) reveals that in that case, EclipseLink with H2 embedded is 17.5 times faster than OpenJPA with H2 server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
OpenJPA
H2 server
EclipseLink
H2 embedded
OpenJPA
H2 server
EclipseLink
H2 embedded
OpenJPA
H2 server
Basic Person Test30.42.929.17.629.75.2
Element Collection Test19.60.002227.61.923.60.93
Inheritance Test33.80.01339.84.036.82.0
Indexing Test22.24.141.38.831.86.5
Graph (Binary Tree) Test16.00.3820.00.4918.00.44
Multithreading Test33.75.929.014.031.410.0
All Tests25.92.231.16.128.54.2

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

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 H2 embedded database (19.6) reveals that in that case, EclipseLink with H2 embedded is 8,909 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
H2 embedded
OpenJPA
H2 server
EclipseLink
H2 embedded
OpenJPA
H2 server
EclipseLink
H2 embedded
OpenJPA
H2 server
Basic Person Test4.43.71.41.02.92.4
Element Collection Test4.12.02.41.23.21.6
Inheritance Test3.42.82.01.12.72.0
Indexing Test13.03.822.87.517.95.7
Multithreading Test1.00.980.671.00.851.0
All Tests5.22.75.92.45.52.5

The results above show that in general EclipseLink with H2 embedded is 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 H2 embedded database (5.5) reveals that in these tests, EclipseLink with H2 embedded is 2.2 times faster than OpenJPA with H2 server.

A large performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of OpenJPA with H2 database server (3.8) to the normalized speed of EclipseLink with H2 embedded database (13.0) reveals that in that case, EclipseLink with H2 embedded is 3.4 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
H2 embedded
OpenJPA
H2 server
EclipseLink
H2 embedded
OpenJPA
H2 server
EclipseLink
H2 embedded
OpenJPA
H2 server
Basic Person Test16.63.07.62.012.12.5
Element Collection Test15.30.007810.51.912.90.94
Inheritance Test15.70.0349.82.812.71.4
Indexing Test12.12.89.93.211.03.0
Graph (Binary Tree) Test13.70.797.00.4310.30.61
Multithreading Test20.97.04.22.512.64.8
All Tests15.72.38.22.112.02.2

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

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 H2 embedded database (15.3) reveals that in that case, EclipseLink with H2 embedded is 1,962 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
H2 embedded
OpenJPA
H2 server
EclipseLink
H2 embedded
OpenJPA
H2 server
EclipseLink
H2 embedded
OpenJPA
H2 server
Basic Person Test35.13.219.62.227.42.7
Element Collection Test19.30.00608.50.8813.90.44
Inheritance Test36.00.03014.03.125.01.6
Indexing Test42.56.519.23.630.95.1
Graph (Binary Tree) Test12.20.7314.40.7513.30.74
Multithreading Test54.47.625.85.240.16.4
All Tests33.33.016.92.625.12.8

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

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 H2 embedded database (19.3) reveals that in that case, EclipseLink with H2 embedded is 3,217 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
H2 embedded
OpenJPA
H2 server
EclipseLink
H2 embedded
OpenJPA
H2 server
EclipseLink
H2 embedded
OpenJPA
H2 server
Basic Person Test22.33.313.33.017.83.1
Element Collection Test15.70.9311.41.513.61.2
Inheritance Test23.51.514.92.619.22.0
Indexing Test25.54.921.55.423.55.1
Graph (Binary Tree) Test14.90.7514.00.6314.50.69
Multithreading Test28.15.914.25.421.15.6
All Tests21.92.914.93.218.43.0

The results above show that in general EclipseLink with H2 embedded is much 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 H2 embedded database (18.4) reveals that in these tests, EclipseLink with H2 embedded is 6.1 times faster than OpenJPA with H2 server.

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

Other Head to Head DBMS/JPA Comparisons