Compare with

Comparison of EclipseLink with HSQLDB embedded vs Hibernate 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
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
Basic Person Test27.13.817.23.022.23.4
Element Collection Test17.22.08.21.312.71.7
Inheritance Test26.73.411.93.019.33.2
Indexing Test30.64.818.64.124.64.4
Graph (Binary Tree) Test20.01.815.91.618.01.7
Multithreading Test32.56.911.43.922.05.4
All Tests25.73.813.92.819.83.3

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than Hibernate with Derby server in persisting JPA entity objects to the database. Comparing the normalized speed of Hibernate with Derby database server (3.3) to the normalized speed of EclipseLink with HSQLDB embedded database (19.8) reveals that in these tests, EclipseLink with HSQLDB embedded is 6.0 times faster than Hibernate with Derby server.

A huge 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 HSQLDB embedded database (20.0) reveals that in that case, EclipseLink with HSQLDB embedded is 11.1 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
 EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
Basic Person Test24.43.836.08.430.26.1
Element Collection Test14.91.019.11.017.01.0
Inheritance Test22.83.540.09.731.46.6
Indexing Test20.73.238.79.529.76.4
Graph (Binary Tree) Test8.70.9114.21.211.41.1
Multithreading Test24.27.828.013.426.110.6
All Tests19.33.429.37.224.35.3

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than Hibernate with Derby server in retrieving JPA entity objects from the database. Comparing the normalized speed of Hibernate with Derby database server (5.3) to the normalized speed of EclipseLink with HSQLDB embedded database (24.3) reveals that in these tests, EclipseLink with HSQLDB embedded is 4.6 times faster than Hibernate with Derby server.

A huge 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 HSQLDB embedded database (19.1) reveals that in that case, EclipseLink with HSQLDB embedded is 19.1 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
 EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
Basic Person Test2.934.00.884.11.919.1
Element Collection Test3.233.81.40.642.317.2
Inheritance Test2.620.51.15.01.912.8
Indexing Test21.52.033.39.227.45.6
Multithreading Test1.136.20.525.10.8220.6
All Tests6.325.37.44.86.915.1

The results above show that in general Hibernate with Derby server is more efficient than EclipseLink with HSQLDB embedded in executing the tested JPA queries. Comparing the normalized speed of EclipseLink with HSQLDB embedded database (6.9) to the normalized speed of Hibernate with Derby database server (15.1) reveals that in these tests, Hibernate with Derby server is 2.2 times faster than EclipseLink with HSQLDB embedded.

A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of EclipseLink with HSQLDB embedded database (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 HSQLDB embedded.

On the other hand, Hibernate with Derby server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of Hibernate with Derby database server (2.0) to the normalized speed of EclipseLink with HSQLDB embedded database (21.5) reveals that in that case, Hibernate with Derby server is 10.8 times slower than EclipseLink with HSQLDB embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
Basic Person Test17.92.97.02.512.52.7
Element Collection Test14.62.38.31.511.41.9
Inheritance Test16.22.99.73.513.03.2
Indexing Test12.03.06.84.29.43.6
Graph (Binary Tree) Test4.71.23.40.584.00.91
Multithreading Test24.46.84.42.514.44.6
All Tests15.03.26.62.510.82.8

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than Hibernate with Derby server in updating JPA entity objects in the database. Comparing the normalized speed of Hibernate with Derby database server (2.8) to the normalized speed of EclipseLink with HSQLDB embedded database (10.8) reveals that in these tests, EclipseLink with HSQLDB embedded is 3.9 times faster than Hibernate with Derby server.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
Basic Person Test32.32.920.33.526.33.2
Element Collection Test14.31.76.00.8710.21.3
Inheritance Test29.22.923.93.626.63.2
Indexing Test55.33.727.13.641.23.7
Graph (Binary Tree) Test6.80.6914.10.7010.40.70
Multithreading Test52.96.228.45.140.65.6
All Tests31.83.020.02.925.93.0

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than Hibernate with Derby server in deleting JPA entity objects from the database. Comparing the normalized speed of Hibernate with Derby database server (3.0) to the normalized speed of EclipseLink with HSQLDB embedded database (25.9) reveals that in these tests, EclipseLink with HSQLDB embedded is 8.6 times faster than Hibernate with Derby server.

A huge performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of Hibernate with Derby database server (0.70) to the normalized speed of EclipseLink with HSQLDB embedded database (14.1) reveals that in that case, EclipseLink with HSQLDB embedded is 20.1 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
 EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
Basic Person Test20.99.516.34.318.66.9
Element Collection Test12.88.28.61.110.74.6
Inheritance Test19.56.617.35.018.45.8
Indexing Test28.03.324.96.126.54.7
Graph (Binary Tree) Test10.01.211.91.011.01.1
Multithreading Test27.012.814.66.020.89.4
All Tests20.17.115.74.017.95.6

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than Hibernate with Derby server in performing JPA database operations. Comparing the normalized speed of Hibernate with Derby database server (5.6) to the normalized speed of EclipseLink with HSQLDB embedded database (17.9) reveals that in these tests, EclipseLink with HSQLDB embedded is 3.2 times faster than Hibernate with Derby server.

A huge performance gap has been detected when using graphs of objects with large transaction/retrieval size. Comparing the normalized speed of Hibernate with Derby database server (1.0) to the normalized speed of EclipseLink with HSQLDB embedded database (11.9) reveals that in that case, EclipseLink with HSQLDB embedded is 11.9 times faster than Hibernate with Derby server.

Other Head to Head DBMS/JPA Comparisons