Compare with

Comparison of Hibernate with HSQLDB embedded vs EclipseLink with Derby 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
HSQLDB embedded
EclipseLink
Derby embedded
Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Basic Person Test32.65.513.13.722.94.6
Element Collection Test15.13.08.21.711.72.4
Inheritance Test25.55.313.63.519.54.4
Indexing Test29.66.918.84.624.25.8
Graph (Binary Tree) Test13.82.015.61.914.71.9
Multithreading Test37.49.313.04.125.26.7
All Tests25.65.313.73.219.74.3

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Basic Person Test24.816.416.458.720.637.5
Element Collection Test11.37.510.813.311.010.4
Inheritance Test21.717.121.058.921.338.0
Indexing Test11.914.221.567.416.740.8
Graph (Binary Tree) Test3.62.84.75.74.14.2
Multithreading Test19.828.021.548.720.638.4
All Tests15.514.316.042.115.728.2

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

A large performance gap has been detected when using simple basic entities with large retrieval size. Comparing the normalized speed of Hibernate with HSQLDB embedded database (16.4) to the normalized speed of EclipseLink with Derby embedded database (58.7) reveals that in that case, EclipseLink with Derby embedded is 3.6 times faster than Hibernate with HSQLDB embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Basic Person Test3.653.40.8813.82.233.6
Element Collection Test3.437.91.74.42.621.2
Inheritance Test2.937.41.015.01.926.2
Indexing Test9.97.621.749.315.828.4
Multithreading Test1.141.20.586.10.8223.6
All Tests4.235.55.217.74.726.6

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

A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of Hibernate with HSQLDB embedded database (1.1) to the normalized speed of EclipseLink with Derby embedded database (41.2) reveals that in that case, EclipseLink with Derby embedded is 37.5 times faster than Hibernate with HSQLDB embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Basic Person Test14.26.45.06.79.66.5
Element Collection Test10.15.45.66.27.85.8
Inheritance Test13.46.57.59.210.57.8
Indexing Test10.77.36.111.18.49.2
Graph (Binary Tree) Test3.72.82.51.73.12.2
Multithreading Test23.921.33.85.013.913.1
All Tests12.78.35.16.68.97.5

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

A large performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of EclipseLink with Derby embedded database (6.4) to the normalized speed of Hibernate with HSQLDB embedded database (14.2) reveals that in that case, Hibernate with HSQLDB embedded is 2.2 times faster than EclipseLink with Derby embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Basic Person Test26.14.617.54.721.84.6
Element Collection Test9.12.55.21.47.11.9
Inheritance Test21.43.917.74.519.64.2
Indexing Test33.06.216.33.824.75.0
Graph (Binary Tree) Test5.41.18.21.06.81.1
Multithreading Test38.56.228.65.833.56.0
All Tests22.34.115.63.518.93.8

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

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

Comparison of database storage efficiency (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Basic Person Test41.451.141.451.041.451.1
Element Collection Test46.938.546.939.446.938.9
Inheritance Test41.448.041.447.941.448.0
Indexing Test48.451.649.252.348.852.0
Graph (Binary Tree) Test28.513.421.411.725.012.6
Multithreading Test51.952.610.38.431.130.5
All Tests43.142.535.135.139.138.8

The results above show that in general Hibernate with HSQLDB embedded is slightly more efficient than EclipseLink with Derby embedded in using disk space.

A large gap has been detected when using graphs of objects with small transaction size. Comparing the normalized score of EclipseLink with Derby embedded database (13.4) to the normalized score of Hibernate with HSQLDB embedded database (28.5) reveals that in that case, Hibernate with HSQLDB embedded is 2.1 times more efficient than EclipseLink with Derby embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Hibernate
HSQLDB embedded
EclipseLink
Derby embedded
Basic Person Test20.217.310.617.515.417.4
Element Collection Test9.811.36.35.48.08.3
Inheritance Test17.014.012.218.214.616.1
Indexing Test19.08.416.927.218.017.8
Graph (Binary Tree) Test6.62.27.82.67.22.4
Multithreading Test24.121.213.513.918.817.6
All Tests16.512.711.314.513.913.6

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

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

Other Head to Head DBMS/JPA Comparisons