Compare with

Comparison of Hibernate with MySQL 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
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Basic Person Test3.627.11.617.22.622.2
Element Collection Test1.617.20.728.21.112.7
Inheritance Test3.726.71.611.92.719.3
Indexing Test5.430.62.618.64.024.6
Graph (Binary Tree) Test1.520.01.215.91.418.0
Multithreading Test7.432.52.911.45.222.0
All Tests3.925.71.813.92.819.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
 Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Basic Person Test3.024.411.036.07.030.2
Element Collection Test0.3414.91.219.10.7917.0
Inheritance Test1.322.814.540.07.931.4
Indexing Test2.520.712.838.77.629.7
Graph (Binary Tree) Test0.558.70.7114.20.6311.4
Multithreading Test0.2324.213.828.07.026.1
All Tests1.319.39.029.35.224.3

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
 Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Basic Person Test10.02.92.00.886.01.9
Element Collection Test6.73.20.531.43.62.3
Inheritance Test2.82.61.61.12.21.9
Indexing Test0.4421.52.033.31.227.4
Multithreading Test2.11.10.980.521.50.82
All Tests4.46.31.47.42.96.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
 Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Basic Person Test0.7317.91.67.01.212.5
Element Collection Test0.3914.61.28.30.7811.4
Inheritance Test0.6116.22.19.71.413.0
Indexing Test0.8112.02.66.81.79.4
Graph (Binary Tree) Test0.694.70.403.40.544.0
Multithreading Test0.6324.43.04.41.814.4
All Tests0.6415.01.86.61.210.8

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
 Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Basic Person Test1.132.31.720.31.426.3
Element Collection Test0.2114.30.536.00.3710.2
Inheritance Test0.6529.21.823.91.226.6
Indexing Test0.8155.32.027.11.441.2
Graph (Binary Tree) Test0.556.80.6214.10.5810.4
Multithreading Test0.3552.94.128.42.240.6
All Tests0.6131.81.820.01.225.9

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
 Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Hibernate
MySQL server
EclipseLink
HSQLDB embedded
Basic Person Test3.720.93.616.33.618.6
Element Collection Test1.812.80.848.61.310.7
Inheritance Test1.819.54.317.33.118.4
Indexing Test2.028.04.424.93.226.5
Graph (Binary Tree) Test0.8310.00.7311.90.7811.0
Multithreading Test2.127.05.014.63.620.8
All Tests2.120.13.215.72.717.9

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