Compare with

Comparison of Hibernate with Derby server vs EclipseLink 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
 Hibernate
Derby server
EclipseLink
H2 server
Hibernate
Derby server
EclipseLink
H2 server
Hibernate
Derby server
EclipseLink
H2 server
Basic Person Test3.85.63.02.53.44.0
Element Collection Test2.04.21.31.51.72.8
Inheritance Test3.46.63.02.13.24.4
Indexing Test4.89.74.14.14.46.9
Graph (Binary Tree) Test1.84.71.63.51.74.1
Multithreading Test6.910.23.94.05.47.1
All Tests3.86.82.82.93.34.9

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby server
EclipseLink
H2 server
Hibernate
Derby server
EclipseLink
H2 server
Hibernate
Derby server
EclipseLink
H2 server
Basic Person Test3.85.58.48.26.16.8
Element Collection Test1.03.21.04.21.03.7
Inheritance Test3.54.79.710.16.67.4
Indexing Test3.24.49.59.46.46.9
Graph (Binary Tree) Test0.911.11.21.91.11.5
Multithreading Test7.812.213.415.910.614.0
All Tests3.45.27.28.35.36.7

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby server
EclipseLink
H2 server
Hibernate
Derby server
EclipseLink
H2 server
Hibernate
Derby server
EclipseLink
H2 server
Basic Person Test34.03.84.11.119.12.5
Element Collection Test33.84.10.641.117.22.6
Inheritance Test20.53.25.01.312.82.3
Indexing Test2.03.09.28.05.65.5
Multithreading Test36.21.15.11.020.61.1
All Tests25.33.04.82.515.12.8

The results above show that in general Hibernate 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 Hibernate with Derby database server (15.1) reveals that in these tests, Hibernate with Derby server is 5.4 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 Hibernate with Derby database server (36.2) reveals that in that case, Hibernate with Derby server is 32.9 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
 Hibernate
Derby server
EclipseLink
H2 server
Hibernate
Derby server
EclipseLink
H2 server
Hibernate
Derby server
EclipseLink
H2 server
Basic Person Test2.94.52.52.22.73.4
Element Collection Test2.33.81.52.41.93.1
Inheritance Test2.94.43.53.03.23.7
Indexing Test3.04.24.23.13.63.7
Graph (Binary Tree) Test1.21.40.580.790.911.1
Multithreading Test6.87.82.52.54.65.1
All Tests3.24.32.52.32.83.3

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby server
EclipseLink
H2 server
Hibernate
Derby server
EclipseLink
H2 server
Hibernate
Derby server
EclipseLink
H2 server
Basic Person Test2.96.43.53.13.24.8
Element Collection Test1.73.00.871.31.32.2
Inheritance Test2.95.63.62.83.24.2
Indexing Test3.710.33.63.83.77.0
Graph (Binary Tree) Test0.691.50.701.30.701.4
Multithreading Test6.27.05.14.95.66.0
All Tests3.05.62.92.93.04.3

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

A large performance gap has been detected when using database indexes with small transaction size. Comparing the normalized speed of Hibernate with Derby database server (3.7) to the normalized speed of EclipseLink with H2 database server (10.3) reveals that in that case, EclipseLink with H2 server is 2.8 times faster than Hibernate with Derby server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
Derby server
EclipseLink
H2 server
Hibernate
Derby server
EclipseLink
H2 server
Hibernate
Derby server
EclipseLink
H2 server
Basic Person Test9.55.24.33.46.94.3
Element Collection Test8.23.61.12.14.62.9
Inheritance Test6.64.95.03.95.84.4
Indexing Test3.36.36.15.74.76.0
Graph (Binary Tree) Test1.22.11.01.91.12.0
Multithreading Test12.87.76.05.79.46.7
All Tests7.15.14.03.85.64.5

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

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

Other Head to Head DBMS/JPA Comparisons