Compare with

Comparison of EclipseLink with PostgreSQL server vs Hibernate with HSQLDB 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
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
Basic Person Test7.8stopped11.7stopped9.8stopped
Element Collection Test9.4stopped9.1stopped9.2stopped
Inheritance Test6.2stopped12.4stopped9.3stopped
Indexing Test10.7stopped12.7stopped11.7stopped
Graph (Binary Tree) Test7.8stopped7.9stopped7.8stopped
Multithreading Test10.9stopped0.0000stopped5.4stopped
All Tests8.8stopped9.0stopped8.9stopped

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
Basic Person Test2.2stopped10.8stopped6.5stopped
Element Collection Test0.52stopped0.47stopped0.50stopped
Inheritance Test2.0stopped9.6stopped5.8stopped
Indexing Test1.7stopped10.9stopped6.3stopped
Graph (Binary Tree) Test0.22stopped0.48stopped0.35stopped
Multithreading Test3.2stopped16.7stopped10.0stopped
All Tests1.6stopped8.2stopped4.9stopped

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
Basic Person Test1.1stopped3.7stopped2.4stopped
Element Collection Test1.1stopped0.51stopped0.80stopped
Inheritance Test0.99stopped4.5stopped2.8stopped
Indexing Test0.76stopped3.5stopped2.1stopped
Multithreading Test4.2stopped6.9stopped5.5stopped
All Tests1.6stopped3.8stopped2.7stopped

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
Basic Person Test1.8stopped3.7stopped2.7stopped
Element Collection Test2.0stopped1.0stopped1.5stopped
Inheritance Test1.5stopped5.1stopped3.3stopped
Indexing Test3.4stopped5.0stopped4.2stopped
Graph (Binary Tree) Test0.63stopped0.44stopped0.54stopped
Multithreading Test4.5stopped3.4stopped3.9stopped
All Tests2.3stopped3.1stopped2.7stopped

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
Basic Person Test14.1stopped19.7stopped16.9stopped
Element Collection Test4.8stopped0.55stopped2.7stopped
Inheritance Test16.8stopped15.6stopped16.2stopped
Indexing Test20.7stopped14.6stopped17.7stopped
Graph (Binary Tree) Test6.0stopped8.0stopped7.0stopped
Multithreading Test23.4stopped0.0000stopped11.7stopped
All Tests14.3stopped9.7stopped12.0stopped

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
Basic Person Test5.4stopped9.9stopped7.7stopped
Element Collection Test3.5stopped2.3stopped2.9stopped
Inheritance Test5.5stopped9.4stopped7.5stopped
Indexing Test7.4stopped9.3stopped8.4stopped
Graph (Binary Tree) Test3.7stopped4.2stopped3.9stopped
Multithreading Test9.2stopped5.4stopped7.3stopped
All Tests5.9stopped6.9stopped6.4stopped

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

A huge performance gap has been detected when using simple basic entities with small transaction/retrieval size. Comparing the normalized speed of Hibernate with HSQLDB database server (0.0000) to the normalized speed of EclipseLink with PostgreSQL database server (5.4) reveals that in that case, EclipseLink with PostgreSQL server is ? times faster than Hibernate with HSQLDB server.

Other Head to Head DBMS/JPA Comparisons