Compare with

Comparison of EclipseLink with H2 server 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 server
OpenJPA
Derby server
EclipseLink
H2 server
OpenJPA
Derby server
EclipseLink
H2 server
OpenJPA
Derby server
Basic Person Test5.63.12.52.74.02.9
Element Collection Test4.22.01.51.72.81.8
Inheritance Test6.63.02.12.34.42.6
Indexing Test9.74.74.14.16.94.4
Graph (Binary Tree) Test4.70.713.50.644.10.67
Multithreading Test10.26.04.03.87.14.9
All Tests6.83.32.92.54.92.9

The results above show that in general EclipseLink with H2 server is more efficient than OpenJPA with Derby server 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 Derby database server (0.71) to the normalized speed of EclipseLink with H2 database server (4.7) reveals that in that case, EclipseLink with H2 server is 6.6 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 server
OpenJPA
Derby server
EclipseLink
H2 server
OpenJPA
Derby server
EclipseLink
H2 server
OpenJPA
Derby server
Basic Person Test5.50.788.211.66.86.2
Element Collection Test3.20.00244.21.13.70.54
Inheritance Test4.70.01410.15.07.42.5
Indexing Test4.40.629.413.06.96.8
Graph (Binary Tree) Test1.10.0651.90.391.50.23
Multithreading Test12.21.615.919.014.010.3
All Tests5.20.518.38.46.74.4

The results above show that in general EclipseLink with H2 server is more efficient than OpenJPA with Derby 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 Derby database server (0.0024) to the normalized speed of EclipseLink with H2 database server (3.2) reveals that in that case, EclipseLink with H2 server is 1,333 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 server
OpenJPA
Derby server
EclipseLink
H2 server
OpenJPA
Derby server
EclipseLink
H2 server
OpenJPA
Derby server
Basic Person Test3.829.21.15.52.517.3
Element Collection Test4.12.21.11.42.61.8
Inheritance Test3.22.21.31.02.31.6
Indexing Test3.02.28.011.75.57.0
Multithreading Test1.135.51.08.31.121.9
All Tests3.014.32.55.62.89.9

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 server
OpenJPA
Derby server
EclipseLink
H2 server
OpenJPA
Derby server
EclipseLink
H2 server
OpenJPA
Derby server
Basic Person Test4.51.52.24.03.42.8
Element Collection Test3.80.00812.41.93.10.94
Inheritance Test4.40.0433.03.83.71.9
Indexing Test4.21.83.16.83.74.3
Graph (Binary Tree) Test1.40.160.790.271.10.22
Multithreading Test7.86.92.55.05.15.9
All Tests4.31.72.33.63.32.7

The results above show that in general EclipseLink with H2 server is slightly more efficient than OpenJPA with Derby 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 Derby database server (0.0081) to the normalized speed of EclipseLink with H2 database server (3.8) reveals that in that case, EclipseLink with H2 server is 469 times faster than OpenJPA with Derby server.

On the other hand, EclipseLink with H2 server is slower, for instance, when using database indexes with large transaction size. Comparing the normalized speed of EclipseLink with H2 database server (3.1) to the normalized speed of OpenJPA with Derby database server (6.8) reveals that in that case, EclipseLink with H2 server is 2.2 times slower 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 server
OpenJPA
Derby server
EclipseLink
H2 server
OpenJPA
Derby server
EclipseLink
H2 server
OpenJPA
Derby server
Basic Person Test6.41.43.13.74.82.5
Element Collection Test3.00.00821.31.42.20.71
Inheritance Test5.60.0352.82.54.21.3
Indexing Test10.32.33.83.57.02.9
Graph (Binary Tree) Test1.50.131.30.351.40.24
Multithreading Test7.03.64.94.06.03.8
All Tests5.61.32.92.64.31.9

The results above show that in general EclipseLink with H2 server is 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 database server (4.3) reveals that in these tests, EclipseLink with H2 server is 2.3 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 database server (3.0) reveals that in that case, EclipseLink with H2 server is 366 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 server
OpenJPA
Derby server
EclipseLink
H2 server
OpenJPA
Derby server
EclipseLink
H2 server
OpenJPA
Derby server
Basic Person Test5.27.23.45.54.36.4
Element Collection Test3.60.842.11.52.91.2
Inheritance Test4.91.13.92.94.42.0
Indexing Test6.32.35.77.86.05.1
Graph (Binary Tree) Test2.10.271.90.412.00.34
Multithreading Test7.710.75.78.06.79.4
All Tests5.13.93.84.54.54.2

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

A large 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 database server (2.1) reveals that in that case, EclipseLink with H2 server is 7.8 times faster than OpenJPA with Derby server.

Other Head to Head DBMS/JPA Comparisons