Compare with

Comparison of EclipseLink with H2 server vs Hibernate 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 server
Hibernate
H2 server
EclipseLink
H2 server
Hibernate
H2 server
EclipseLink
H2 server
Hibernate
H2 server
Basic Person Test5.64.62.53.04.03.8
Element Collection Test4.23.71.51.12.82.4
Inheritance Test6.66.72.13.14.44.9
Indexing Test9.78.24.14.26.96.2
Graph (Binary Tree) Test4.73.43.53.94.13.7
Multithreading Test10.26.84.05.07.15.9
All Tests6.85.62.93.44.94.5

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 server
Hibernate
H2 server
EclipseLink
H2 server
Hibernate
H2 server
EclipseLink
H2 server
Hibernate
H2 server
Basic Person Test5.53.18.26.06.84.6
Element Collection Test3.21.04.21.13.71.0
Inheritance Test4.72.910.17.67.45.2
Indexing Test4.42.69.47.06.94.8
Graph (Binary Tree) Test1.10.421.91.11.50.78
Multithreading Test12.26.515.910.514.08.5
All Tests5.22.88.35.66.74.2

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

A large performance gap has been detected when using JPA element collections with large retrieval size. Comparing the normalized speed of Hibernate with H2 database server (1.1) to the normalized speed of EclipseLink with H2 database server (4.2) reveals that in that case, EclipseLink with H2 server is 3.8 times faster than Hibernate with H2 server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 server
Hibernate
H2 server
EclipseLink
H2 server
Hibernate
H2 server
EclipseLink
H2 server
Hibernate
H2 server
Basic Person Test3.83.71.11.02.52.3
Element Collection Test4.13.71.10.632.62.2
Inheritance Test3.23.21.31.42.32.3
Indexing Test3.01.78.05.85.53.8
Multithreading Test1.11.11.00.881.11.0
All Tests3.02.72.51.92.82.3

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 server
Hibernate
H2 server
EclipseLink
H2 server
Hibernate
H2 server
EclipseLink
H2 server
Hibernate
H2 server
Basic Person Test4.52.92.21.83.42.4
Element Collection Test3.82.62.41.13.11.9
Inheritance Test4.43.23.02.53.72.9
Indexing Test4.22.93.12.73.72.8
Graph (Binary Tree) Test1.41.20.790.431.10.79
Multithreading Test7.85.62.52.45.14.0
All Tests4.33.12.31.83.32.5

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

A large performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of Hibernate with H2 database server (1.1) to the normalized speed of EclipseLink with H2 database server (2.4) reveals that in that case, EclipseLink with H2 server is 2.2 times faster than Hibernate with H2 server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 server
Hibernate
H2 server
EclipseLink
H2 server
Hibernate
H2 server
EclipseLink
H2 server
Hibernate
H2 server
Basic Person Test6.43.83.12.44.83.1
Element Collection Test3.01.91.31.12.21.5
Inheritance Test5.63.72.82.54.23.1
Indexing Test10.37.63.83.17.05.3
Graph (Binary Tree) Test1.50.991.30.911.40.95
Multithreading Test7.06.14.97.36.06.7
All Tests5.64.02.92.94.33.5

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
H2 server
Hibernate
H2 server
EclipseLink
H2 server
Hibernate
H2 server
EclipseLink
H2 server
Hibernate
H2 server
Basic Person Test5.23.63.42.84.33.2
Element Collection Test3.62.62.11.02.91.8
Inheritance Test4.94.03.93.44.43.7
Indexing Test6.34.65.74.56.04.6
Graph (Binary Tree) Test2.11.51.91.62.01.6
Multithreading Test7.75.25.75.26.75.2
All Tests5.13.73.83.24.53.4

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

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

Other Head to Head DBMS/JPA Comparisons