Compare with

Comparison of EclipseLink with HSQLDB embedded vs Hibernate 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
 EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
Basic Person Test27.17.117.23.422.25.2
Element Collection Test17.22.98.21.712.72.3
Inheritance Test26.77.011.93.619.35.3
Indexing Test30.69.318.66.124.67.7
Graph (Binary Tree) Test20.03.015.92.918.02.9
Multithreading Test32.531.711.413.922.022.8
All Tests25.710.213.95.319.87.7

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

A large performance gap has been detected when using graphs of objects with small transaction size. Comparing the normalized speed of Hibernate with PostgreSQL database server (3.0) to the normalized speed of EclipseLink with HSQLDB embedded database (20.0) reveals that in that case, EclipseLink with HSQLDB embedded is 6.7 times faster than Hibernate with PostgreSQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
Basic Person Test24.45.536.011.530.28.5
Element Collection Test14.90.02519.10.01717.00.021
Inheritance Test22.85.240.014.031.49.6
Indexing Test20.74.638.713.329.78.9
Graph (Binary Tree) Test8.70.6114.20.7811.40.70
Multithreading Test24.211.328.017.026.114.2
All Tests19.34.529.39.424.37.0

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than Hibernate with PostgreSQL server in retrieving JPA entity objects from the database. Comparing the normalized speed of Hibernate with PostgreSQL database server (7.0) to the normalized speed of EclipseLink with HSQLDB embedded database (24.3) reveals that in these tests, EclipseLink with HSQLDB embedded is 3.5 times faster than Hibernate with PostgreSQL server.

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 HSQLDB embedded database (19.1) reveals that in that case, EclipseLink with HSQLDB embedded is 1,124 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
 EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
Basic Person Test2.955.50.886.11.930.8
Element Collection Test3.211.01.40.0162.35.5
Inheritance Test2.652.31.18.71.930.5
Indexing Test21.50.05033.38.827.44.4
Multithreading Test1.155.20.529.20.8232.2
All Tests6.334.87.46.66.920.7

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

A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of EclipseLink with HSQLDB embedded database (1.1) to the normalized speed of Hibernate with PostgreSQL database server (55.2) reveals that in that case, Hibernate with PostgreSQL server is 50.2 times faster than EclipseLink with HSQLDB embedded.

On the other hand, Hibernate with PostgreSQL server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of Hibernate with PostgreSQL database server (0.050) to the normalized speed of EclipseLink with HSQLDB embedded database (21.5) reveals that in that case, Hibernate with PostgreSQL server is 430 times slower than EclipseLink with HSQLDB embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
Basic Person Test17.95.37.02.712.54.0
Element Collection Test14.60.0678.30.02611.40.046
Inheritance Test16.25.49.73.813.04.6
Indexing Test12.05.46.84.39.44.8
Graph (Binary Tree) Test4.71.13.40.584.00.82
Multithreading Test24.429.64.46.314.418.0
All Tests15.07.86.62.910.85.4

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
Basic Person Test32.35.320.34.226.34.8
Element Collection Test14.30.0206.0stopped10.20.0098
Inheritance Test29.25.123.94.226.64.6
Indexing Test55.39.527.16.341.27.9
Graph (Binary Tree) Test6.80.01214.10.01210.40.012
Multithreading Test52.923.328.421.840.622.5
All Tests31.87.220.06.125.96.6

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

A huge performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of Hibernate with PostgreSQL database server (0.012) to the normalized speed of EclipseLink with HSQLDB embedded database (14.1) reveals that in that case, EclipseLink with HSQLDB embedded is 1,175 times faster than Hibernate with PostgreSQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
EclipseLink
HSQLDB embedded
Hibernate
PostgreSQL server
Basic Person Test20.915.716.35.618.610.7
Element Collection Test12.82.88.60.3510.71.6
Inheritance Test19.515.017.36.918.410.9
Indexing Test28.05.824.97.826.56.8
Graph (Binary Tree) Test10.01.211.91.111.01.1
Multithreading Test27.030.214.613.620.821.9
All Tests20.112.115.76.017.99.1

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

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

Other Head to Head DBMS/JPA Comparisons