Compare with

Comparison of Hibernate with Derby server vs EclipseLink with HSQLDB 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
 Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Basic Person Test3.827.13.017.23.422.2
Element Collection Test2.017.21.38.21.712.7
Inheritance Test3.426.73.011.93.219.3
Indexing Test4.830.64.118.64.424.6
Graph (Binary Tree) Test1.820.01.615.91.718.0
Multithreading Test6.932.53.911.45.422.0
All Tests3.825.72.813.93.319.8

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
 Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Basic Person Test3.824.48.436.06.130.2
Element Collection Test1.014.91.019.11.017.0
Inheritance Test3.522.89.740.06.631.4
Indexing Test3.220.79.538.76.429.7
Graph (Binary Tree) Test0.918.71.214.21.111.4
Multithreading Test7.824.213.428.010.626.1
All Tests3.419.37.229.35.324.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
 Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Basic Person Test34.02.94.10.8819.11.9
Element Collection Test33.83.20.641.417.22.3
Inheritance Test20.52.65.01.112.81.9
Indexing Test2.021.59.233.35.627.4
Multithreading Test36.21.15.10.5220.60.82
All Tests25.36.34.87.415.16.9

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
 Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Basic Person Test2.917.92.57.02.712.5
Element Collection Test2.314.61.58.31.911.4
Inheritance Test2.916.23.59.73.213.0
Indexing Test3.012.04.26.83.69.4
Graph (Binary Tree) Test1.24.70.583.40.914.0
Multithreading Test6.824.42.54.44.614.4
All Tests3.215.02.56.62.810.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
 Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Basic Person Test2.932.33.520.33.226.3
Element Collection Test1.714.30.876.01.310.2
Inheritance Test2.929.23.623.93.226.6
Indexing Test3.755.33.627.13.741.2
Graph (Binary Tree) Test0.696.80.7014.10.7010.4
Multithreading Test6.252.95.128.45.640.6
All Tests3.031.82.920.03.025.9

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
 Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Hibernate
Derby server
EclipseLink
HSQLDB embedded
Basic Person Test9.520.94.316.36.918.6
Element Collection Test8.212.81.18.64.610.7
Inheritance Test6.619.55.017.35.818.4
Indexing Test3.328.06.124.94.726.5
Graph (Binary Tree) Test1.210.01.011.91.111.0
Multithreading Test12.827.06.014.69.420.8
All Tests7.120.14.015.75.617.9

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