Compare with

Comparison of EclipseLink with Derby server 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 server
Hibernate
MySQL server
EclipseLink
Derby server
Hibernate
MySQL server
EclipseLink
Derby server
Hibernate
MySQL server
Basic Person Test3.83.63.11.63.42.6
Element Collection Test2.21.61.50.721.81.1
Inheritance Test3.93.72.91.63.42.7
Indexing Test5.25.44.32.64.74.0
Graph (Binary Tree) Test1.91.51.71.21.81.4
Multithreading Test6.17.43.92.95.05.2
All Tests3.83.92.91.83.42.8

The results above show that in general EclipseLink with Derby server is slightly 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 database server (1.5) reveals that in that case, EclipseLink with Derby server is 2.1 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 server
Hibernate
MySQL server
EclipseLink
Derby server
Hibernate
MySQL server
EclipseLink
Derby server
Hibernate
MySQL server
Basic Person Test6.43.011.311.08.87.0
Element Collection Test1.80.342.41.22.10.79
Inheritance Test3.71.312.914.58.37.9
Indexing Test3.62.512.812.88.27.6
Graph (Binary Tree) Test0.610.550.730.710.670.63
Multithreading Test8.50.2319.813.814.17.0
All Tests4.11.310.09.07.05.2

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

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 database server (8.5) reveals that in that case, EclipseLink with Derby server is 37.0 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 server
Hibernate
MySQL server
EclipseLink
Derby server
Hibernate
MySQL server
EclipseLink
Derby server
Hibernate
MySQL server
Basic Person Test45.810.05.32.025.66.0
Element Collection Test35.26.70.990.5318.13.6
Inheritance Test23.12.85.91.614.52.2
Indexing Test2.50.4412.22.07.41.2
Multithreading Test34.32.17.70.9821.01.5
All Tests28.24.46.41.417.32.9

The results above show that in general EclipseLink with Derby server 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 database server (17.3) reveals that in these tests, EclipseLink with Derby server is 6.0 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 (2.1) to the normalized speed of EclipseLink with Derby database server (34.3) reveals that in that case, EclipseLink with Derby server is 16.3 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 server
Hibernate
MySQL server
EclipseLink
Derby server
Hibernate
MySQL server
EclipseLink
Derby server
Hibernate
MySQL server
Basic Person Test3.90.734.41.64.11.2
Element Collection Test1.70.391.61.21.60.78
Inheritance Test4.60.616.12.15.31.4
Indexing Test4.50.817.62.66.11.7
Graph (Binary Tree) Test0.700.690.420.400.560.54
Multithreading Test7.30.634.83.06.01.8
All Tests3.80.644.21.84.01.2

The results above show that in general EclipseLink with Derby server 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 database server (4.0) reveals that in these tests, EclipseLink with Derby server is 3.3 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 database server (7.3) reveals that in that case, EclipseLink with Derby server is 11.6 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 server
Hibernate
MySQL server
EclipseLink
Derby server
Hibernate
MySQL server
EclipseLink
Derby server
Hibernate
MySQL server
Basic Person Test2.81.13.91.73.31.4
Element Collection Test1.20.210.550.530.870.37
Inheritance Test3.30.653.71.83.51.2
Indexing Test4.90.813.52.04.21.4
Graph (Binary Tree) Test0.510.550.500.620.510.58
Multithreading Test4.80.355.74.15.32.2
All Tests2.90.613.01.83.01.2

The results above show that in general EclipseLink with Derby server is 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 database server (3.0) reveals that in these tests, EclipseLink with Derby server is 2.5 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 database server (4.8) reveals that in that case, EclipseLink with Derby server is 13.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 server
Hibernate
MySQL server
EclipseLink
Derby server
Hibernate
MySQL server
EclipseLink
Derby server
Hibernate
MySQL server
Basic Person Test12.53.75.63.69.13.6
Element Collection Test8.41.81.40.844.91.3
Inheritance Test7.71.86.34.37.03.1
Indexing Test4.12.08.14.46.13.2
Graph (Binary Tree) Test0.930.830.830.730.880.78
Multithreading Test12.22.18.45.010.33.6
All Tests7.92.15.23.26.62.7

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

A large 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 database server (12.2) reveals that in that case, EclipseLink with Derby server is 5.8 times faster than Hibernate with MySQL server.

Other Head to Head DBMS/JPA Comparisons