Compare with

Comparison of Hibernate with Derby 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
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Basic Person Test3.87.33.04.23.45.8
Element Collection Test2.03.11.31.91.72.5
Inheritance Test3.46.93.05.03.25.9
Indexing Test4.810.04.16.84.48.4
Graph (Binary Tree) Test1.83.51.63.31.73.4
Multithreading Test6.931.83.914.55.423.1
All Tests3.810.42.86.03.38.2

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
 Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Basic Person Test3.86.88.417.26.112.0
Element Collection Test1.00.0261.00.0201.00.023
Inheritance Test3.56.09.719.76.612.9
Indexing Test3.25.69.519.56.412.6
Graph (Binary Tree) Test0.910.471.20.611.10.54
Multithreading Test7.813.513.427.810.620.6
All Tests3.45.47.214.15.39.8

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
 Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Basic Person Test34.055.54.17.819.131.6
Element Collection Test33.815.40.640.02817.27.7
Inheritance Test20.554.95.011.512.833.2
Indexing Test2.00.0779.210.05.65.1
Multithreading Test36.255.35.112.020.633.7
All Tests25.336.24.88.315.122.3

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
 Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Basic Person Test2.96.22.54.12.75.1
Element Collection Test2.30.0801.50.0281.90.054
Inheritance Test2.96.43.56.13.26.2
Indexing Test3.06.54.27.03.66.8
Graph (Binary Tree) Test1.20.900.580.500.910.70
Multithreading Test6.836.02.59.14.622.5
All Tests3.29.32.54.52.86.9

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
 Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Basic Person Test2.95.73.55.73.25.7
Element Collection Test1.70.0250.87stopped1.30.012
Inheritance Test2.95.53.65.43.25.4
Indexing Test3.710.43.610.03.710.2
Graph (Binary Tree) Test0.690.0160.700.0130.700.015
Multithreading Test6.226.35.116.85.621.6
All Tests3.08.02.96.33.07.2

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
 Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Hibernate
Derby server
EclipseLink
PostgreSQL server
Basic Person Test9.516.34.37.86.912.1
Element Collection Test8.23.71.10.404.62.1
Inheritance Test6.615.95.09.55.812.7
Indexing Test3.36.56.110.74.78.6
Graph (Binary Tree) Test1.21.21.01.11.11.2
Multithreading Test12.832.66.016.09.424.3
All Tests7.113.14.07.85.610.5

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