Compare with

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

The results above show that in general EclipseLink with Derby 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 Derby database server (7.9) reveals that in these tests, EclipseLink with Derby 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
Derby server
Hibernate
HSQLDB server
EclipseLink
Derby server
Hibernate
HSQLDB server
EclipseLink
Derby server
Basic Person Teststopped1.8stopped7.6stopped4.7
Element Collection Teststopped0.86stopped0.58stopped0.72
Inheritance Teststopped1.8stopped6.6stopped4.2
Indexing Teststopped1.7stopped7.7stopped4.7
Graph (Binary Tree) Teststopped0.12stopped0.26stopped0.19
Multithreading Teststopped2.5stopped12.5stopped7.5
All Testsstopped1.5stopped5.9stopped3.7

The results above show that in general EclipseLink with Derby 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 Derby database server (3.7) reveals that in these tests, EclipseLink with Derby 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
Derby server
Hibernate
HSQLDB server
EclipseLink
Derby server
Hibernate
HSQLDB server
EclipseLink
Derby server
Basic Person Teststopped0.46stopped2.4stopped1.4
Element Collection Teststopped0.92stopped1.1stopped1.0
Inheritance Teststopped0.42stopped2.4stopped1.4
Indexing Teststopped1.3stopped3.3stopped2.3
Multithreading Teststopped2.4stopped4.3stopped3.4
All Testsstopped1.1stopped2.7stopped1.9

The results above show that in general EclipseLink with Derby 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 Derby database server (1.9) reveals that in these tests, EclipseLink with Derby 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
Derby server
Hibernate
HSQLDB server
EclipseLink
Derby server
Hibernate
HSQLDB server
EclipseLink
Derby server
Basic Person Teststopped1.7stopped4.1stopped2.9
Element Collection Teststopped2.6stopped1.2stopped1.9
Inheritance Teststopped1.6stopped5.2stopped3.4
Indexing Teststopped6.0stopped5.5stopped5.8
Graph (Binary Tree) Teststopped0.67stopped0.41stopped0.54
Multithreading Teststopped1.7stopped4.6stopped3.2
All Testsstopped2.4stopped3.5stopped3.0

The results above show that in general EclipseLink with Derby 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 Derby database server (3.0) reveals that in these tests, EclipseLink with Derby 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
Derby server
Hibernate
HSQLDB server
EclipseLink
Derby server
Hibernate
HSQLDB server
EclipseLink
Derby server
Basic Person Teststopped10.6stopped7.4stopped9.0
Element Collection Teststopped6.0stopped0.67stopped3.3
Inheritance Teststopped12.6stopped14.1stopped13.3
Indexing Teststopped18.7stopped10.1stopped14.4
Graph (Binary Tree) Teststopped5.8stopped9.9stopped7.9
Multithreading Teststopped6.6stopped0.0000stopped3.3
All Testsstopped10.1stopped7.0stopped8.5

The results above show that in general EclipseLink with Derby 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 Derby database server (8.5) reveals that in these tests, EclipseLink with Derby 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
Derby server
Hibernate
HSQLDB server
EclipseLink
Derby server
Hibernate
HSQLDB server
EclipseLink
Derby server
Basic Person Teststopped4.8stopped6.1stopped5.4
Element Collection Teststopped3.7stopped2.1stopped2.9
Inheritance Teststopped4.4stopped7.5stopped6.0
Indexing Teststopped7.5stopped7.5stopped7.5
Graph (Binary Tree) Teststopped3.7stopped4.5stopped4.1
Multithreading Teststopped4.8stopped4.3stopped4.6
All Testsstopped4.8stopped5.4stopped5.1

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

Other Head to Head DBMS/JPA Comparisons