Compare with

Comparison of Hibernate with PostgreSQL server vs EclipseLink 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
 Hibernate
PostgreSQL server
EclipseLink
Derby server
Hibernate
PostgreSQL server
EclipseLink
Derby server
Hibernate
PostgreSQL server
EclipseLink
Derby server
Basic Person Test7.13.83.43.15.23.4
Element Collection Test2.92.21.71.52.31.8
Inheritance Test7.03.93.62.95.33.4
Indexing Test9.35.26.14.37.74.7
Graph (Binary Tree) Test3.01.92.91.72.91.8
Multithreading Test31.76.113.93.922.85.0
All Tests10.23.85.32.97.73.4

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
EclipseLink
Derby server
Hibernate
PostgreSQL server
EclipseLink
Derby server
Hibernate
PostgreSQL server
EclipseLink
Derby server
Basic Person Test5.56.411.511.38.58.8
Element Collection Test0.0251.80.0172.40.0212.1
Inheritance Test5.23.714.012.99.68.3
Indexing Test4.63.613.312.88.98.2
Graph (Binary Tree) Test0.610.610.780.730.700.67
Multithreading Test11.38.517.019.814.214.1
All Tests4.54.19.410.07.07.0

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

A huge performance gap has been detected 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 Derby database server (2.4) reveals that in that case, EclipseLink with Derby server is 141 times faster than Hibernate with PostgreSQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
EclipseLink
Derby server
Hibernate
PostgreSQL server
EclipseLink
Derby server
Hibernate
PostgreSQL server
EclipseLink
Derby server
Basic Person Test55.545.86.15.330.825.6
Element Collection Test11.035.20.0160.995.518.1
Inheritance Test52.323.18.75.930.514.5
Indexing Test0.0502.58.812.24.47.4
Multithreading Test55.234.39.27.732.221.0
All Tests34.828.26.66.420.717.3

The results above show that in general Hibernate with PostgreSQL server is slightly more efficient than EclipseLink 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 EclipseLink with Derby database server (23.1) to the normalized speed of Hibernate with PostgreSQL database server (52.3) reveals that in that case, Hibernate with PostgreSQL server is 2.3 times faster than EclipseLink with Derby 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 Derby database server (0.99) reveals that in that case, Hibernate with PostgreSQL server is 61.9 times slower than EclipseLink with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
EclipseLink
Derby server
Hibernate
PostgreSQL server
EclipseLink
Derby server
Hibernate
PostgreSQL server
EclipseLink
Derby server
Basic Person Test5.33.92.74.44.04.1
Element Collection Test0.0671.70.0261.60.0461.6
Inheritance Test5.44.63.86.14.65.3
Indexing Test5.44.54.37.64.86.1
Graph (Binary Tree) Test1.10.700.580.420.820.56
Multithreading Test29.67.36.34.818.06.0
All Tests7.83.82.94.25.44.0

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
EclipseLink
Derby server
Hibernate
PostgreSQL server
EclipseLink
Derby server
Hibernate
PostgreSQL server
EclipseLink
Derby server
Basic Person Test5.32.84.23.94.83.3
Element Collection Test0.0201.2stopped0.550.00980.87
Inheritance Test5.13.34.23.74.63.5
Indexing Test9.54.96.33.57.94.2
Graph (Binary Tree) Test0.0120.510.0120.500.0120.51
Multithreading Test23.34.821.85.722.55.3
All Tests7.22.96.13.06.63.0

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

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

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
EclipseLink
Derby server
Hibernate
PostgreSQL server
EclipseLink
Derby server
Hibernate
PostgreSQL server
EclipseLink
Derby server
Basic Person Test15.712.55.65.610.79.1
Element Collection Test2.88.40.351.41.64.9
Inheritance Test15.07.76.96.310.97.0
Indexing Test5.84.17.88.16.86.1
Graph (Binary Tree) Test1.20.931.10.831.10.88
Multithreading Test30.212.213.68.421.910.3
All Tests12.17.96.05.29.16.6

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

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

Other Head to Head DBMS/JPA Comparisons