Compare with

Comparison of Hibernate with HSQLDB server vs EclipseLink with H2 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
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Basic Person Teststopped12.6stopped9.5stopped11.1
Element Collection Teststopped12.5stopped6.6stopped9.5
Inheritance Teststopped6.5stopped10.5stopped8.5
Indexing Teststopped12.2stopped12.3stopped12.3
Graph (Binary Tree) Teststopped8.3stopped7.3stopped7.8
Multithreading Teststopped11.5stopped0.0000stopped5.8
All Testsstopped10.6stopped7.7stopped9.2

The results above show that in general EclipseLink with H2 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 H2 database server (9.2) reveals that in these tests, EclipseLink with H2 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
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Basic Person Teststopped2.8stopped6.6stopped4.7
Element Collection Teststopped1.5stopped1.8stopped1.7
Inheritance Teststopped2.1stopped7.9stopped5.0
Indexing Teststopped2.4stopped8.0stopped5.2
Graph (Binary Tree) Teststopped0.38stopped0.81stopped0.60
Multithreading Teststopped4.7stopped11.2stopped8.0
All Testsstopped2.3stopped6.0stopped4.2

The results above show that in general EclipseLink with H2 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 H2 database server (4.2) reveals that in these tests, EclipseLink with H2 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
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Basic Person Teststopped1.2stopped3.1stopped2.2
Element Collection Teststopped1.8stopped1.9stopped1.9
Inheritance Teststopped0.75stopped3.3stopped2.0
Indexing Teststopped2.1stopped3.5stopped2.8
Multithreading Teststopped3.6stopped6.7stopped5.1
All Testsstopped1.9stopped3.7stopped2.8

The results above show that in general EclipseLink with H2 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 H2 database server (2.8) reveals that in these tests, EclipseLink with H2 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
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Basic Person Teststopped2.1stopped2.8stopped2.4
Element Collection Teststopped4.8stopped1.9stopped3.4
Inheritance Teststopped2.1stopped3.0stopped2.6
Indexing Teststopped5.5stopped4.4stopped5.0
Graph (Binary Tree) Teststopped1.0stopped0.73stopped0.89
Multithreading Teststopped2.7stopped1.4stopped2.0
All Testsstopped3.0stopped2.4stopped2.7

The results above show that in general EclipseLink with H2 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 H2 database server (2.7) reveals that in these tests, EclipseLink with H2 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
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Basic Person Teststopped12.1stopped9.6stopped10.9
Element Collection Teststopped8.3stopped1.2stopped4.8
Inheritance Teststopped13.7stopped7.4stopped10.6
Indexing Teststopped23.0stopped7.0stopped15.0
Graph (Binary Tree) Teststopped7.5stopped10.9stopped9.2
Multithreading Teststopped7.0stopped0.0000stopped3.5
All Testsstopped11.9stopped6.0stopped9.0

The results above show that in general EclipseLink with H2 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 H2 database server (9.0) reveals that in these tests, EclipseLink with H2 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
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Basic Person Teststopped6.2stopped6.3stopped6.2
Element Collection Teststopped5.8stopped2.7stopped4.2
Inheritance Teststopped5.0stopped6.4stopped5.7
Indexing Teststopped9.0stopped7.0stopped8.0
Graph (Binary Tree) Teststopped4.3stopped4.9stopped4.6
Multithreading Teststopped5.9stopped3.9stopped4.9
All Testsstopped6.1stopped5.2stopped5.7

The results above show that in general EclipseLink with H2 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 H2 database server (5.7) reveals that in these tests, EclipseLink with H2 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 H2 database server (6.2) reveals that in that case, EclipseLink with H2 server is ? times faster than Hibernate with HSQLDB server.

Other Head to Head DBMS/JPA Comparisons