Compare with

Comparison of EclipseLink with HSQLDB embedded vs Hibernate with MySQL 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
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
Basic Person Test27.13.617.21.622.22.6
Element Collection Test17.21.68.20.7212.71.1
Inheritance Test26.73.711.91.619.32.7
Indexing Test30.65.418.62.624.64.0
Graph (Binary Tree) Test20.01.515.91.218.01.4
Multithreading Test32.57.411.42.922.05.2
All Tests25.73.913.91.819.82.8

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

A huge performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of Hibernate with MySQL database server (1.5) to the normalized speed of EclipseLink with HSQLDB embedded database (20.0) reveals that in that case, EclipseLink with HSQLDB embedded is 13.3 times faster than Hibernate with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
Basic Person Test24.43.036.011.030.27.0
Element Collection Test14.90.3419.11.217.00.79
Inheritance Test22.81.340.014.531.47.9
Indexing Test20.72.538.712.829.77.6
Graph (Binary Tree) Test8.70.5514.20.7111.40.63
Multithreading Test24.20.2328.013.826.17.0
All Tests19.31.329.39.024.35.2

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
Basic Person Test2.910.00.882.01.96.0
Element Collection Test3.26.71.40.532.33.6
Inheritance Test2.62.81.11.61.92.2
Indexing Test21.50.4433.32.027.41.2
Multithreading Test1.12.10.520.980.821.5
All Tests6.34.47.41.46.92.9

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

A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of Hibernate with MySQL database server (0.44) to the normalized speed of EclipseLink with HSQLDB embedded database (21.5) reveals that in that case, EclipseLink with HSQLDB embedded is 48.9 times faster than Hibernate with MySQL server.

On the other hand, EclipseLink with HSQLDB embedded is slower, for instance, when using simple basic entities with small retrieval size. Comparing the normalized speed of EclipseLink with HSQLDB embedded database (2.9) to the normalized speed of Hibernate with MySQL database server (10.0) reveals that in that case, EclipseLink with HSQLDB embedded is 3.4 times slower than Hibernate with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
Basic Person Test17.90.737.01.612.51.2
Element Collection Test14.60.398.31.211.40.78
Inheritance Test16.20.619.72.113.01.4
Indexing Test12.00.816.82.69.41.7
Graph (Binary Tree) Test4.70.693.40.404.00.54
Multithreading Test24.40.634.43.014.41.8
All Tests15.00.646.61.810.81.2

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

A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of Hibernate with MySQL database server (0.63) to the normalized speed of EclipseLink with HSQLDB embedded database (24.4) reveals that in that case, EclipseLink with HSQLDB embedded is 38.7 times faster than Hibernate with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
Basic Person Test32.31.120.31.726.31.4
Element Collection Test14.30.216.00.5310.20.37
Inheritance Test29.20.6523.91.826.61.2
Indexing Test55.30.8127.12.041.21.4
Graph (Binary Tree) Test6.80.5514.10.6210.40.58
Multithreading Test52.90.3528.44.140.62.2
All Tests31.80.6120.01.825.91.2

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

A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of Hibernate with MySQL database server (0.35) to the normalized speed of EclipseLink with HSQLDB embedded database (52.9) reveals that in that case, EclipseLink with HSQLDB embedded is 151 times faster than Hibernate with MySQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
Basic Person Test20.93.716.33.618.63.6
Element Collection Test12.81.88.60.8410.71.3
Inheritance Test19.51.817.34.318.43.1
Indexing Test28.02.024.94.426.53.2
Graph (Binary Tree) Test10.00.8311.90.7311.00.78
Multithreading Test27.02.114.65.020.83.6
All Tests20.12.115.73.217.92.7

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than Hibernate with MySQL server in performing JPA database operations. Comparing the normalized speed of Hibernate with MySQL database server (2.7) to the normalized speed of EclipseLink with HSQLDB embedded database (17.9) reveals that in these tests, EclipseLink with HSQLDB embedded is 6.6 times faster than Hibernate with MySQL 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 MySQL database server (0.73) to the normalized speed of EclipseLink with HSQLDB embedded database (11.9) reveals that in that case, EclipseLink with HSQLDB embedded is 16.3 times faster than Hibernate with MySQL server.

Other Head to Head DBMS/JPA Comparisons