Compare with

Comparison of Hibernate with PostgreSQL server vs EclipseLink 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
PostgreSQL server
EclipseLink
MySQL server
Hibernate
PostgreSQL server
EclipseLink
MySQL server
Hibernate
PostgreSQL server
EclipseLink
MySQL server
Basic Person Test7.13.63.41.55.22.6
Element Collection Test2.91.51.70.692.31.1
Inheritance Test7.03.53.61.45.32.4
Indexing Test9.35.36.12.57.73.9
Graph (Binary Tree) Test3.01.72.91.32.91.5
Multithreading Test31.77.213.92.422.84.8
All Tests10.23.85.31.67.72.7

The results above show that in general Hibernate with PostgreSQL server is more efficient than EclipseLink with MySQL server in persisting JPA entity objects to the database. Comparing the normalized speed of EclipseLink with MySQL database server (2.7) to the normalized speed of Hibernate with PostgreSQL database server (7.7) reveals that in these tests, Hibernate with PostgreSQL server is 2.9 times faster than EclipseLink with MySQL server.

A large performance gap has been detected when using multithreading with large transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (2.4) to the normalized speed of Hibernate with PostgreSQL database server (13.9) reveals that in that case, Hibernate with PostgreSQL server is 5.8 times faster than EclipseLink with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
EclipseLink
MySQL server
Hibernate
PostgreSQL server
EclipseLink
MySQL server
Hibernate
PostgreSQL server
EclipseLink
MySQL server
Basic Person Test5.50.4311.515.58.58.0
Element Collection Test0.0250.160.0171.40.0210.78
Inheritance Test5.20.3914.017.69.69.0
Indexing Test4.60.4313.316.68.98.5
Graph (Binary Tree) Test0.610.530.780.760.700.65
Multithreading Test11.30.1917.011.014.25.6
All Tests4.50.359.410.57.05.4

The results above show that in general Hibernate with PostgreSQL server is slightly more efficient than EclipseLink 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 EclipseLink with MySQL database server (0.19) to the normalized speed of Hibernate with PostgreSQL database server (11.3) reveals that in that case, Hibernate with PostgreSQL server is 59.5 times faster than EclipseLink with MySQL server.

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
EclipseLink
MySQL server
Hibernate
PostgreSQL server
EclipseLink
MySQL server
Hibernate
PostgreSQL server
EclipseLink
MySQL server
Basic Person Test55.51.56.10.4430.80.95
Element Collection Test11.01.40.0160.435.50.92
Inheritance Test52.31.18.70.6130.50.86
Indexing Test0.0500.268.80.524.40.39
Multithreading Test55.21.99.20.7232.21.3
All Tests34.81.26.60.5420.70.88

The results above show that in general Hibernate with PostgreSQL server is much more efficient than EclipseLink with MySQL server in executing the tested JPA queries. Comparing the normalized speed of EclipseLink with MySQL database server (0.88) to the normalized speed of Hibernate with PostgreSQL database server (20.7) reveals that in these tests, Hibernate with PostgreSQL server is 23.5 times faster than EclipseLink with MySQL server.

A huge performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of EclipseLink with MySQL database server (1.1) to the normalized speed of Hibernate with PostgreSQL database server (52.3) reveals that in that case, Hibernate with PostgreSQL server is 47.5 times faster than EclipseLink with MySQL server.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
EclipseLink
MySQL server
Hibernate
PostgreSQL server
EclipseLink
MySQL server
Hibernate
PostgreSQL server
EclipseLink
MySQL server
Basic Person Test5.30.392.71.84.01.1
Element Collection Test0.0670.230.0261.40.0460.83
Inheritance Test5.40.423.82.64.61.5
Indexing Test5.40.464.33.14.81.8
Graph (Binary Tree) Test1.10.670.580.410.820.54
Multithreading Test29.60.486.32.618.01.5
All Tests7.80.442.92.05.41.2

The results above show that in general Hibernate with PostgreSQL server is much more efficient than EclipseLink with MySQL server in updating JPA entity objects in the database. Comparing the normalized speed of EclipseLink with MySQL database server (1.2) to the normalized speed of Hibernate with PostgreSQL database server (5.4) reveals that in these tests, Hibernate with PostgreSQL server is 4.5 times faster than EclipseLink with MySQL server.

A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (0.48) to the normalized speed of Hibernate with PostgreSQL database server (29.6) reveals that in that case, Hibernate with PostgreSQL server is 61.7 times faster than EclipseLink with MySQL server.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
EclipseLink
MySQL server
Hibernate
PostgreSQL server
EclipseLink
MySQL server
Hibernate
PostgreSQL server
EclipseLink
MySQL server
Basic Person Test5.30.354.21.74.81.0
Element Collection Test0.0200.11stopped0.510.00980.31
Inheritance Test5.10.294.21.64.60.94
Indexing Test9.50.466.31.97.91.2
Graph (Binary Tree) Test0.0120.540.0120.490.0120.51
Multithreading Test23.30.3121.83.622.51.9
All Tests7.20.346.11.66.60.98

The results above show that in general Hibernate with PostgreSQL server is much more efficient than EclipseLink with MySQL server in deleting JPA entity objects from the database. Comparing the normalized speed of EclipseLink with MySQL database server (0.98) to the normalized speed of Hibernate with PostgreSQL database server (6.6) reveals that in these tests, Hibernate with PostgreSQL server is 6.7 times faster than EclipseLink with MySQL server.

A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with MySQL database server (0.31) to the normalized speed of Hibernate with PostgreSQL database server (23.3) reveals that in that case, Hibernate with PostgreSQL server is 75.2 times faster than EclipseLink with MySQL server.

On the other hand, Hibernate with PostgreSQL server is slower, for instance, when using graphs of objects with small transaction size. Comparing the normalized speed of Hibernate with PostgreSQL database server (0.012) to the normalized speed of EclipseLink with MySQL database server (0.54) reveals that in that case, Hibernate with PostgreSQL server is 45.0 times slower than EclipseLink with MySQL server.

Comparison of JPA/Database speed - the averages (normalized score, higher is better)

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
EclipseLink
MySQL server
Hibernate
PostgreSQL server
EclipseLink
MySQL server
Hibernate
PostgreSQL server
EclipseLink
MySQL server
Basic Person Test15.71.35.64.210.72.7
Element Collection Test2.80.690.350.891.60.79
Inheritance Test15.01.16.94.810.92.9
Indexing Test5.81.47.84.96.83.2
Graph (Binary Tree) Test1.20.851.10.731.10.79
Multithreading Test30.22.013.64.021.93.0
All Tests12.11.26.03.39.12.3

The results above show that in general Hibernate with PostgreSQL server is much more efficient than EclipseLink with MySQL server in performing JPA database operations. Comparing the normalized speed of EclipseLink with MySQL database server (2.3) to the normalized speed of Hibernate with PostgreSQL database server (9.1) reveals that in these tests, Hibernate with PostgreSQL server is 4.0 times faster than EclipseLink with MySQL server.

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

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

Other Head to Head DBMS/JPA Comparisons