Compare with

Comparison of EclipseLink with PostgreSQL server vs Hibernate with Derby 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
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
Basic Person Test7.33.84.23.05.83.4
Element Collection Test3.12.01.91.32.51.7
Inheritance Test6.93.45.03.05.93.2
Indexing Test10.04.86.84.18.44.4
Graph (Binary Tree) Test3.51.83.31.63.41.7
Multithreading Test31.86.914.53.923.15.4
All Tests10.43.86.02.88.23.3

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
Basic Person Test6.83.817.28.412.06.1
Element Collection Test0.0261.00.0201.00.0231.0
Inheritance Test6.03.519.79.712.96.6
Indexing Test5.63.219.59.512.66.4
Graph (Binary Tree) Test0.470.910.611.20.541.1
Multithreading Test13.57.827.813.420.610.6
All Tests5.43.414.17.29.85.3

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

A large performance gap has been detected when using multithreading with large retrieval size. Comparing the normalized speed of Hibernate with Derby database server (13.4) to the normalized speed of EclipseLink with PostgreSQL database server (27.8) reveals that in that case, EclipseLink with PostgreSQL server is 2.1 times faster than Hibernate with Derby 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 Derby database server (1.0) reveals that in that case, EclipseLink with PostgreSQL server is 50.0 times slower than Hibernate with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
Basic Person Test55.534.07.84.131.619.1
Element Collection Test15.433.80.0280.647.717.2
Inheritance Test54.920.511.55.033.212.8
Indexing Test0.0772.010.09.25.15.6
Multithreading Test55.336.212.05.133.720.6
All Tests36.225.38.34.822.315.1

The results above show that in general EclipseLink with PostgreSQL server is more efficient than Hibernate with Derby server in executing the tested JPA queries.

A large performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of Hibernate with Derby database server (20.5) to the normalized speed of EclipseLink with PostgreSQL database server (54.9) reveals that in that case, EclipseLink with PostgreSQL server is 2.7 times faster than Hibernate with Derby server.

On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.077) to the normalized speed of Hibernate with Derby database server (2.0) reveals that in that case, EclipseLink with PostgreSQL server is 26.0 times slower than Hibernate with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
Basic Person Test6.22.94.12.55.12.7
Element Collection Test0.0802.30.0281.50.0541.9
Inheritance Test6.42.96.13.56.23.2
Indexing Test6.53.07.04.26.83.6
Graph (Binary Tree) Test0.901.20.500.580.700.91
Multithreading Test36.06.89.12.522.54.6
All Tests9.33.24.52.56.92.8

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

A large performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of Hibernate with Derby database server (6.8) to the normalized speed of EclipseLink with PostgreSQL database server (36.0) reveals that in that case, EclipseLink with PostgreSQL server is 5.3 times faster than Hibernate with Derby 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 Derby database server (1.5) reveals that in that case, EclipseLink with PostgreSQL server is 53.6 times slower than Hibernate with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
Basic Person Test5.72.95.73.55.73.2
Element Collection Test0.0251.7stopped0.870.0121.3
Inheritance Test5.52.95.43.65.43.2
Indexing Test10.43.710.03.610.23.7
Graph (Binary Tree) Test0.0160.690.0130.700.0150.70
Multithreading Test26.36.216.85.121.65.6
All Tests8.03.06.32.97.23.0

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

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

On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.025) to the normalized speed of Hibernate with Derby database server (1.7) reveals that in that case, EclipseLink with PostgreSQL server is 68.0 times slower than Hibernate with Derby server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
Basic Person Test16.39.57.84.312.16.9
Element Collection Test3.78.20.401.12.14.6
Inheritance Test15.96.69.55.012.75.8
Indexing Test6.53.310.76.18.64.7
Graph (Binary Tree) Test1.21.21.11.01.21.1
Multithreading Test32.612.816.06.024.39.4
All Tests13.17.17.84.010.55.6

The results above show that in general EclipseLink with PostgreSQL server is more efficient than Hibernate with Derby server in performing JPA database operations.

A large performance gap has been detected when using multithreading with large transaction/retrieval size. Comparing the normalized speed of Hibernate with Derby database server (6.0) to the normalized speed of EclipseLink with PostgreSQL database server (16.0) reveals that in that case, EclipseLink with PostgreSQL server is 2.7 times faster than Hibernate with Derby 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 Derby database server (1.1) reveals that in that case, EclipseLink with PostgreSQL server is 2.8 times slower than Hibernate with Derby server.

Other Head to Head DBMS/JPA Comparisons