Compare with

Comparison of EclipseLink with Derby 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
Derby embedded
Hibernate
MySQL server
EclipseLink
Derby embedded
Hibernate
MySQL server
EclipseLink
Derby embedded
Hibernate
MySQL server
Basic Person Test5.53.63.71.64.62.6
Element Collection Test3.01.61.70.722.41.1
Inheritance Test5.33.73.51.64.42.7
Indexing Test6.95.44.62.65.84.0
Graph (Binary Tree) Test2.01.51.91.21.91.4
Multithreading Test9.37.44.12.96.75.2
All Tests5.33.93.21.84.32.8

The results above show that in general EclipseLink with Derby embedded is more efficient than Hibernate with MySQL server in persisting JPA entity objects to the database.

A large performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of Hibernate with MySQL database server (0.72) to the normalized speed of EclipseLink with Derby embedded database (1.7) reveals that in that case, EclipseLink with Derby embedded is 2.4 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
Derby embedded
Hibernate
MySQL server
EclipseLink
Derby embedded
Hibernate
MySQL server
EclipseLink
Derby embedded
Hibernate
MySQL server
Basic Person Test16.43.058.711.037.57.0
Element Collection Test7.50.3413.31.210.40.79
Inheritance Test17.11.358.914.538.07.9
Indexing Test14.22.567.412.840.87.6
Graph (Binary Tree) Test2.80.555.70.714.20.63
Multithreading Test28.00.2348.713.838.47.0
All Tests14.31.342.19.028.25.2

The results above show that in general EclipseLink with Derby 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 Derby embedded database (28.2) reveals that in these tests, EclipseLink with Derby embedded is 5.4 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 Derby embedded database (28.0) reveals that in that case, EclipseLink with Derby embedded is 122 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
Derby embedded
Hibernate
MySQL server
EclipseLink
Derby embedded
Hibernate
MySQL server
EclipseLink
Derby embedded
Hibernate
MySQL server
Basic Person Test53.410.013.82.033.66.0
Element Collection Test37.96.74.40.5321.23.6
Inheritance Test37.42.815.01.626.22.2
Indexing Test7.60.4449.32.028.41.2
Multithreading Test41.22.16.10.9823.61.5
All Tests35.54.417.71.426.62.9

The results above show that in general EclipseLink with Derby embedded is much 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 Derby embedded database (26.6) reveals that in these tests, EclipseLink with Derby embedded is 9.2 times faster than Hibernate with MySQL server.

A huge performance gap has been detected when using database indexes with large retrieval size. Comparing the normalized speed of Hibernate with MySQL database server (2.0) to the normalized speed of EclipseLink with Derby embedded database (49.3) reveals that in that case, EclipseLink with Derby embedded is 24.6 times faster than Hibernate with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
Derby embedded
Hibernate
MySQL server
EclipseLink
Derby embedded
Hibernate
MySQL server
EclipseLink
Derby embedded
Hibernate
MySQL server
Basic Person Test6.40.736.71.66.51.2
Element Collection Test5.40.396.21.25.80.78
Inheritance Test6.50.619.22.17.81.4
Indexing Test7.30.8111.12.69.21.7
Graph (Binary Tree) Test2.80.691.70.402.20.54
Multithreading Test21.30.635.03.013.11.8
All Tests8.30.646.61.87.51.2

The results above show that in general EclipseLink with Derby 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 Derby embedded database (7.5) reveals that in these tests, EclipseLink with Derby embedded is 6.2 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 Derby embedded database (21.3) reveals that in that case, EclipseLink with Derby embedded is 33.8 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
Derby embedded
Hibernate
MySQL server
EclipseLink
Derby embedded
Hibernate
MySQL server
EclipseLink
Derby embedded
Hibernate
MySQL server
Basic Person Test4.61.14.71.74.61.4
Element Collection Test2.50.211.40.531.90.37
Inheritance Test3.90.654.51.84.21.2
Indexing Test6.20.813.82.05.01.4
Graph (Binary Tree) Test1.10.551.00.621.10.58
Multithreading Test6.20.355.84.16.02.2
All Tests4.10.613.51.83.81.2

The results above show that in general EclipseLink with Derby 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 Derby embedded database (3.8) reveals that in these tests, EclipseLink with Derby embedded is 3.2 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 Derby embedded database (6.2) reveals that in that case, EclipseLink with Derby embedded is 17.7 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
Derby embedded
Hibernate
MySQL server
EclipseLink
Derby embedded
Hibernate
MySQL server
EclipseLink
Derby embedded
Hibernate
MySQL server
Basic Person Test17.33.717.53.617.43.6
Element Collection Test11.31.85.40.848.31.3
Inheritance Test14.01.818.24.316.13.1
Indexing Test8.42.027.24.417.83.2
Graph (Binary Tree) Test2.20.832.60.732.40.78
Multithreading Test21.22.113.95.017.63.6
All Tests12.72.114.53.213.62.7

The results above show that in general EclipseLink with Derby 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 Derby embedded database (13.6) reveals that in these tests, EclipseLink with Derby embedded is 5.0 times faster than Hibernate with MySQL server.

A huge performance gap has been detected when using multithreading with small transaction/retrieval size. Comparing the normalized speed of Hibernate with MySQL database server (2.1) to the normalized speed of EclipseLink with Derby embedded database (21.2) reveals that in that case, EclipseLink with Derby embedded is 10.1 times faster than Hibernate with MySQL server.

Other Head to Head DBMS/JPA Comparisons