Compare with

Comparison of Hibernate with HSQLDB server vs EclipseLink with Derby embedded

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
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Basic Person Teststopped11.5stopped9.1stopped10.3
Element Collection Teststopped7.3stopped5.5stopped6.4
Inheritance Teststopped6.6stopped7.5stopped7.0
Indexing Teststopped10.9stopped12.7stopped11.8
Graph (Binary Tree) Teststopped3.6stopped2.9stopped3.3
Multithreading Teststopped10.4stopped0.0000stopped5.2
All Testsstopped8.4stopped6.3stopped7.3

The results above show that in general EclipseLink with Derby embedded 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 Derby embedded database (7.3) reveals that in these tests, EclipseLink with Derby embedded 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
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Basic Person Teststopped12.3stopped29.3stopped20.8
Element Collection Teststopped7.5stopped11.7stopped9.6
Inheritance Teststopped6.2stopped29.0stopped17.6
Indexing Teststopped5.4stopped31.9stopped18.7
Graph (Binary Tree) Teststopped0.93stopped3.3stopped2.1
Multithreading Teststopped15.2stopped32.4stopped23.8
All Testsstopped7.9stopped22.9stopped15.4

The results above show that in general EclipseLink with Derby embedded 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 Derby embedded database (15.4) reveals that in these tests, EclipseLink with Derby embedded 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
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Basic Person Teststopped1.4stopped5.9stopped3.6
Element Collection Teststopped2.9stopped6.0stopped4.5
Inheritance Teststopped0.97stopped7.1stopped4.0
Indexing Teststopped13.8stopped18.5stopped16.1
Multithreading Teststopped4.6stopped10.4stopped7.5
All Testsstopped4.7stopped9.6stopped7.2

The results above show that in general EclipseLink with Derby embedded 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 Derby embedded database (7.2) reveals that in these tests, EclipseLink with Derby embedded 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
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Basic Person Teststopped3.3stopped6.2stopped4.8
Element Collection Teststopped10.0stopped5.5stopped7.7
Inheritance Teststopped3.9stopped7.6stopped5.8
Indexing Teststopped10.3stopped8.3stopped9.3
Graph (Binary Tree) Teststopped1.7stopped1.7stopped1.7
Multithreading Teststopped5.2stopped5.5stopped5.3
All Testsstopped5.8stopped5.8stopped5.8

The results above show that in general EclipseLink with Derby embedded 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 Derby embedded database (5.8) reveals that in these tests, EclipseLink with Derby embedded 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
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Basic Person Teststopped12.9stopped12.2stopped12.5
Element Collection Teststopped12.6stopped1.1stopped6.8
Inheritance Teststopped14.1stopped7.6stopped10.9
Indexing Teststopped20.6stopped4.4stopped12.5
Graph (Binary Tree) Teststopped5.0stopped7.4stopped6.2
Multithreading Teststopped4.8stopped0.0000stopped2.4
All Testsstopped11.6stopped5.5stopped8.6

The results above show that in general EclipseLink with Derby embedded 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 Derby embedded database (8.6) reveals that in these tests, EclipseLink with Derby embedded 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
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Basic Person Teststopped8.3stopped12.5stopped10.4
Element Collection Teststopped8.1stopped6.0stopped7.0
Inheritance Teststopped6.4stopped11.7stopped9.0
Indexing Teststopped12.2stopped15.2stopped13.7
Graph (Binary Tree) Teststopped2.8stopped3.8stopped3.3
Multithreading Teststopped8.0stopped9.7stopped8.8
All Testsstopped7.8stopped10.0stopped8.9

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

Other Head to Head DBMS/JPA Comparisons