Compare with

Comparison of Hibernate 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
 Hibernate
Derby server
Hibernate
MySQL server
Hibernate
Derby server
Hibernate
MySQL server
Hibernate
Derby server
Hibernate
MySQL server
Basic Person Test3.83.63.01.63.42.6
Element Collection Test2.01.61.30.721.71.1
Inheritance Test3.43.73.01.63.22.7
Indexing Test4.85.44.12.64.44.0
Graph (Binary Tree) Test1.81.51.61.21.71.4
Multithreading Test6.97.43.92.95.45.2
All Tests3.83.92.81.83.32.8

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby server
Hibernate
MySQL server
Hibernate
Derby server
Hibernate
MySQL server
Hibernate
Derby server
Hibernate
MySQL server
Basic Person Test3.83.08.411.06.17.0
Element Collection Test1.00.341.01.21.00.79
Inheritance Test3.51.39.714.56.67.9
Indexing Test3.22.59.512.86.47.6
Graph (Binary Tree) Test0.910.551.20.711.10.63
Multithreading Test7.80.2313.413.810.67.0
All Tests3.41.37.29.05.35.2

The results above show that in general Hibernate with Derby server is slightly 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 Hibernate with Derby database server (7.8) reveals that in that case, Hibernate with Derby server is 33.9 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
Derby server
Hibernate
MySQL server
Hibernate
Derby server
Hibernate
MySQL server
Hibernate
Derby server
Hibernate
MySQL server
Basic Person Test34.010.04.12.019.16.0
Element Collection Test33.86.70.640.5317.23.6
Inheritance Test20.52.85.01.612.82.2
Indexing Test2.00.449.22.05.61.2
Multithreading Test36.22.15.10.9820.61.5
All Tests25.34.44.81.415.12.9

The results above show that in general Hibernate 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 Hibernate with Derby database server (15.1) reveals that in these tests, Hibernate with Derby server is 5.2 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 Hibernate with Derby database server (36.2) reveals that in that case, Hibernate with Derby server is 17.2 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
 Hibernate
Derby server
Hibernate
MySQL server
Hibernate
Derby server
Hibernate
MySQL server
Hibernate
Derby server
Hibernate
MySQL server
Basic Person Test2.90.732.51.62.71.2
Element Collection Test2.30.391.51.21.90.78
Inheritance Test2.90.613.52.13.21.4
Indexing Test3.00.814.22.63.61.7
Graph (Binary Tree) Test1.20.690.580.400.910.54
Multithreading Test6.80.632.53.04.61.8
All Tests3.20.642.51.82.81.2

The results above show that in general Hibernate with Derby server is 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 Hibernate with Derby database server (2.8) reveals that in these tests, Hibernate with Derby server is 2.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 Hibernate with Derby database server (6.8) reveals that in that case, Hibernate with Derby server is 10.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
 Hibernate
Derby server
Hibernate
MySQL server
Hibernate
Derby server
Hibernate
MySQL server
Hibernate
Derby server
Hibernate
MySQL server
Basic Person Test2.91.13.51.73.21.4
Element Collection Test1.70.210.870.531.30.37
Inheritance Test2.90.653.61.83.21.2
Indexing Test3.70.813.62.03.71.4
Graph (Binary Tree) Test0.690.550.700.620.700.58
Multithreading Test6.20.355.14.15.62.2
All Tests3.00.612.91.83.01.2

The results above show that in general Hibernate 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 Hibernate with Derby database server (3.0) reveals that in these tests, Hibernate 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 Hibernate with Derby database server (6.2) reveals that in that case, Hibernate with Derby server 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
 Hibernate
Derby server
Hibernate
MySQL server
Hibernate
Derby server
Hibernate
MySQL server
Hibernate
Derby server
Hibernate
MySQL server
Basic Person Test9.53.74.33.66.93.6
Element Collection Test8.21.81.10.844.61.3
Inheritance Test6.61.85.04.35.83.1
Indexing Test3.32.06.14.44.73.2
Graph (Binary Tree) Test1.20.831.00.731.10.78
Multithreading Test12.82.16.05.09.43.6
All Tests7.12.14.03.25.62.7

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

Other Head to Head DBMS/JPA Comparisons