Compare with

Comparison of Hibernate with HSQLDB 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
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Basic Person Teststopped7.8stopped11.7stopped9.8
Element Collection Teststopped9.4stopped9.1stopped9.2
Inheritance Teststopped6.2stopped12.4stopped9.3
Indexing Teststopped10.7stopped12.7stopped11.7
Graph (Binary Tree) Teststopped7.8stopped7.9stopped7.8
Multithreading Teststopped10.9stopped0.0000stopped5.4
All Testsstopped8.8stopped9.0stopped8.9

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
 Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Basic Person Teststopped2.2stopped10.8stopped6.5
Element Collection Teststopped0.52stopped0.47stopped0.50
Inheritance Teststopped2.0stopped9.6stopped5.8
Indexing Teststopped1.7stopped10.9stopped6.3
Graph (Binary Tree) Teststopped0.22stopped0.48stopped0.35
Multithreading Teststopped3.2stopped16.7stopped10.0
All Testsstopped1.6stopped8.2stopped4.9

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
 Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Basic Person Teststopped1.1stopped3.7stopped2.4
Element Collection Teststopped1.1stopped0.51stopped0.80
Inheritance Teststopped0.99stopped4.5stopped2.8
Indexing Teststopped0.76stopped3.5stopped2.1
Multithreading Teststopped4.2stopped6.9stopped5.5
All Testsstopped1.6stopped3.8stopped2.7

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
 Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Basic Person Teststopped1.8stopped3.7stopped2.7
Element Collection Teststopped2.0stopped1.0stopped1.5
Inheritance Teststopped1.5stopped5.1stopped3.3
Indexing Teststopped3.4stopped5.0stopped4.2
Graph (Binary Tree) Teststopped0.63stopped0.44stopped0.54
Multithreading Teststopped4.5stopped3.4stopped3.9
All Testsstopped2.3stopped3.1stopped2.7

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
 Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Basic Person Teststopped14.1stopped19.7stopped16.9
Element Collection Teststopped4.8stopped0.55stopped2.7
Inheritance Teststopped16.8stopped15.6stopped16.2
Indexing Teststopped20.7stopped14.6stopped17.7
Graph (Binary Tree) Teststopped6.0stopped8.0stopped7.0
Multithreading Teststopped23.4stopped0.0000stopped11.7
All Testsstopped14.3stopped9.7stopped12.0

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
 Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Hibernate
HSQLDB server
EclipseLink
PostgreSQL server
Basic Person Teststopped5.4stopped9.9stopped7.7
Element Collection Teststopped3.5stopped2.3stopped2.9
Inheritance Teststopped5.5stopped9.4stopped7.5
Indexing Teststopped7.4stopped9.3stopped8.4
Graph (Binary Tree) Teststopped3.7stopped4.2stopped3.9
Multithreading Teststopped9.2stopped5.4stopped7.3
All Testsstopped5.9stopped6.9stopped6.4

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