Compare with

Comparison of EclipseLink with H2 embedded vs OpenJPA 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
 EclipseLink
H2 embedded
OpenJPA
H2 embedded
EclipseLink
H2 embedded
OpenJPA
H2 embedded
EclipseLink
H2 embedded
OpenJPA
H2 embedded
Basic Person Test25.117.18.95.817.011.5
Element Collection Test20.410.98.04.914.27.9
Inheritance Test28.714.38.75.918.710.1
Indexing Test37.624.414.013.725.819.1
Graph (Binary Tree) Test17.76.814.76.716.26.7
Multithreading Test30.334.211.410.220.822.2
All Tests26.617.910.97.918.812.9

The results above show that in general EclipseLink with H2 embedded is more efficient than OpenJPA with H2 embedded in persisting JPA entity objects to the database.

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
OpenJPA
H2 embedded
EclipseLink
H2 embedded
OpenJPA
H2 embedded
EclipseLink
H2 embedded
OpenJPA
H2 embedded
Basic Person Test30.414.629.127.229.720.9
Element Collection Test19.60.004627.64.323.62.1
Inheritance Test33.80.01139.87.436.83.7
Indexing Test22.217.041.335.031.826.0
Graph (Binary Tree) Test16.01.020.01.418.01.2
Multithreading Test33.718.729.027.631.423.1
All Tests25.98.631.117.128.512.8

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
OpenJPA
H2 embedded
EclipseLink
H2 embedded
OpenJPA
H2 embedded
EclipseLink
H2 embedded
OpenJPA
H2 embedded
Basic Person Test4.45.01.41.12.93.1
Element Collection Test4.11.72.41.33.21.5
Inheritance Test3.42.22.01.22.71.7
Indexing Test13.013.822.823.217.918.5
Multithreading Test1.01.40.670.600.850.99
All Tests5.24.85.95.55.55.1

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

A large performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with H2 embedded database (1.7) to the normalized speed of EclipseLink with H2 embedded database (4.1) reveals that in that case, EclipseLink with H2 embedded is 2.4 times faster than OpenJPA 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
H2 embedded
EclipseLink
H2 embedded
OpenJPA
H2 embedded
EclipseLink
H2 embedded
OpenJPA
H2 embedded
Basic Person Test16.610.07.66.012.18.0
Element Collection Test15.30.01110.53.812.91.9
Inheritance Test15.70.0469.85.012.72.5
Indexing Test12.18.99.97.011.08.0
Graph (Binary Tree) Test13.72.47.01.310.31.9
Multithreading Test20.916.64.24.312.610.4
All Tests15.76.38.24.612.05.4

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
OpenJPA
H2 embedded
EclipseLink
H2 embedded
OpenJPA
H2 embedded
EclipseLink
H2 embedded
OpenJPA
H2 embedded
Basic Person Test35.118.319.611.127.414.7
Element Collection Test19.30.0128.52.913.91.4
Inheritance Test36.00.03014.06.625.03.3
Indexing Test42.523.219.29.730.916.4
Graph (Binary Tree) Test12.21.814.42.413.32.1
Multithreading Test54.431.225.817.340.124.2
All Tests33.312.416.98.325.110.4

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

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

Comparison of database storage efficiency (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
OpenJPA
H2 embedded
EclipseLink
H2 embedded
OpenJPA
H2 embedded
EclipseLink
H2 embedded
OpenJPA
H2 embedded
Basic Person Test36.227.039.227.037.727.0
Element Collection Test33.330.634.930.634.130.6
Inheritance Test35.427.036.227.035.827.0
Indexing Test39.831.643.732.141.731.9
Graph (Binary Tree) Test41.028.528.421.434.724.9
Multithreading Test48.733.912.49.230.621.5
All Tests39.129.832.524.535.827.2

The results above show that in general EclipseLink with H2 embedded is more efficient than OpenJPA with H2 embedded in using disk space.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
OpenJPA
H2 embedded
EclipseLink
H2 embedded
OpenJPA
H2 embedded
EclipseLink
H2 embedded
OpenJPA
H2 embedded
Basic Person Test22.313.013.310.217.811.6
Element Collection Test15.72.511.43.413.63.0
Inheritance Test23.53.314.95.219.24.3
Indexing Test25.517.521.517.723.517.6
Graph (Binary Tree) Test14.93.014.03.014.53.0
Multithreading Test28.120.414.212.021.116.2
All Tests21.910.214.98.818.49.5

The results above show that in general EclipseLink with H2 embedded is more efficient than OpenJPA with H2 embedded in performing JPA database operations.

A large performance gap has been detected when using class inheritance in the object model with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with H2 embedded database (3.3) to the normalized speed of EclipseLink with H2 embedded database (23.5) reveals that in that case, EclipseLink with H2 embedded is 7.1 times faster than OpenJPA with H2 embedded.

Other Head to Head DBMS/JPA Comparisons