Compare with

Comparison of Hibernate with MySQL server vs EclipseLink with PostgreSQL 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
MySQL server
EclipseLink
PostgreSQL server
Hibernate
MySQL server
EclipseLink
PostgreSQL server
Hibernate
MySQL server
EclipseLink
PostgreSQL server
Basic Person Test3.67.31.64.22.65.8
Element Collection Test1.63.10.721.91.12.5
Inheritance Test3.76.91.65.02.75.9
Indexing Test5.410.02.66.84.08.4
Graph (Binary Tree) Test1.53.51.23.31.43.4
Multithreading Test7.431.82.914.55.223.1
All Tests3.910.41.86.02.88.2

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

A large performance gap has been detected when using multithreading with large transaction size. Comparing the normalized speed of Hibernate with MySQL database server (2.9) to the normalized speed of EclipseLink with PostgreSQL database server (14.5) reveals that in that case, EclipseLink with PostgreSQL server is 5.0 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
PostgreSQL server
Hibernate
MySQL server
EclipseLink
PostgreSQL server
Hibernate
MySQL server
EclipseLink
PostgreSQL server
Basic Person Test3.06.811.017.27.012.0
Element Collection Test0.340.0261.20.0200.790.023
Inheritance Test1.36.014.519.77.912.9
Indexing Test2.55.612.819.57.612.6
Graph (Binary Tree) Test0.550.470.710.610.630.54
Multithreading Test0.2313.513.827.87.020.6
All Tests1.35.49.014.15.29.8

The results above show that in general EclipseLink with PostgreSQL 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 PostgreSQL database server (13.5) reveals that in that case, EclipseLink with PostgreSQL server is 58.7 times faster than Hibernate with MySQL server.

On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using JPA element collections with large retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.020) to the normalized speed of Hibernate with MySQL database server (1.2) reveals that in that case, EclipseLink with PostgreSQL server is 60.0 times slower 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
PostgreSQL server
Hibernate
MySQL server
EclipseLink
PostgreSQL server
Hibernate
MySQL server
EclipseLink
PostgreSQL server
Basic Person Test10.055.52.07.86.031.6
Element Collection Test6.715.40.530.0283.67.7
Inheritance Test2.854.91.611.52.233.2
Indexing Test0.440.0772.010.01.25.1
Multithreading Test2.155.30.9812.01.533.7
All Tests4.436.21.48.32.922.3

The results above show that in general EclipseLink with PostgreSQL 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 PostgreSQL database server (22.3) reveals that in these tests, EclipseLink with PostgreSQL server is 7.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 (2.1) to the normalized speed of EclipseLink with PostgreSQL database server (55.3) reveals that in that case, EclipseLink with PostgreSQL server is 26.3 times faster than Hibernate with MySQL server.

On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using JPA element collections with large retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.028) to the normalized speed of Hibernate with MySQL database server (0.53) reveals that in that case, EclipseLink with PostgreSQL server is 18.9 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
PostgreSQL server
Hibernate
MySQL server
EclipseLink
PostgreSQL server
Hibernate
MySQL server
EclipseLink
PostgreSQL server
Basic Person Test0.736.21.64.11.25.1
Element Collection Test0.390.0801.20.0280.780.054
Inheritance Test0.616.42.16.11.46.2
Indexing Test0.816.52.67.01.76.8
Graph (Binary Tree) Test0.690.900.400.500.540.70
Multithreading Test0.6336.03.09.11.822.5
All Tests0.649.31.84.51.26.9

The results above show that in general EclipseLink with PostgreSQL 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 PostgreSQL database server (6.9) reveals that in these tests, EclipseLink with PostgreSQL server is 5.8 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 PostgreSQL database server (36.0) reveals that in that case, EclipseLink with PostgreSQL server is 57.1 times faster than Hibernate with MySQL server.

On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using JPA element collections with large transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.028) to the normalized speed of Hibernate with MySQL database server (1.2) reveals that in that case, EclipseLink with PostgreSQL server is 42.9 times slower 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
PostgreSQL server
Hibernate
MySQL server
EclipseLink
PostgreSQL server
Hibernate
MySQL server
EclipseLink
PostgreSQL server
Basic Person Test1.15.71.75.71.45.7
Element Collection Test0.210.0250.53stopped0.370.012
Inheritance Test0.655.51.85.41.25.4
Indexing Test0.8110.42.010.01.410.2
Graph (Binary Tree) Test0.550.0160.620.0130.580.015
Multithreading Test0.3526.34.116.82.221.6
All Tests0.618.01.86.31.27.2

The results above show that in general EclipseLink with PostgreSQL server 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 PostgreSQL database server (7.2) reveals that in these tests, EclipseLink with PostgreSQL server is 6.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.35) to the normalized speed of EclipseLink with PostgreSQL database server (26.3) reveals that in that case, EclipseLink with PostgreSQL server is 75.1 times faster than Hibernate with MySQL server.

On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using graphs of objects with large transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.013) to the normalized speed of Hibernate with MySQL database server (0.62) reveals that in that case, EclipseLink with PostgreSQL server is 47.7 times slower 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
PostgreSQL server
Hibernate
MySQL server
EclipseLink
PostgreSQL server
Hibernate
MySQL server
EclipseLink
PostgreSQL server
Basic Person Test3.716.33.67.83.612.1
Element Collection Test1.83.70.840.401.32.1
Inheritance Test1.815.94.39.53.112.7
Indexing Test2.06.54.410.73.28.6
Graph (Binary Tree) Test0.831.20.731.10.781.2
Multithreading Test2.132.65.016.03.624.3
All Tests2.113.13.27.82.710.5

The results above show that in general EclipseLink with PostgreSQL server 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 PostgreSQL database server (10.5) reveals that in these tests, EclipseLink with PostgreSQL server is 3.9 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 PostgreSQL database server (32.6) reveals that in that case, EclipseLink with PostgreSQL server is 15.5 times faster than Hibernate with MySQL server.

On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using JPA element collections with large transaction/retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.40) to the normalized speed of Hibernate with MySQL database server (0.84) reveals that in that case, EclipseLink with PostgreSQL server is 2.1 times slower than Hibernate with MySQL server.

Other Head to Head DBMS/JPA Comparisons