Compare with

Comparison of EclipseLink with Derby embedded 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
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
Basic Person Test11.5stopped9.1stopped10.3stopped
Element Collection Test7.3stopped5.5stopped6.4stopped
Inheritance Test6.6stopped7.5stopped7.0stopped
Indexing Test10.9stopped12.7stopped11.8stopped
Graph (Binary Tree) Test3.6stopped2.9stopped3.3stopped
Multithreading Test10.4stopped0.0000stopped5.2stopped
All Tests8.4stopped6.3stopped7.3stopped

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
 EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
Basic Person Test12.3stopped29.3stopped20.8stopped
Element Collection Test7.5stopped11.7stopped9.6stopped
Inheritance Test6.2stopped29.0stopped17.6stopped
Indexing Test5.4stopped31.9stopped18.7stopped
Graph (Binary Tree) Test0.93stopped3.3stopped2.1stopped
Multithreading Test15.2stopped32.4stopped23.8stopped
All Tests7.9stopped22.9stopped15.4stopped

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
 EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
Basic Person Test1.4stopped5.9stopped3.6stopped
Element Collection Test2.9stopped6.0stopped4.5stopped
Inheritance Test0.97stopped7.1stopped4.0stopped
Indexing Test13.8stopped18.5stopped16.1stopped
Multithreading Test4.6stopped10.4stopped7.5stopped
All Tests4.7stopped9.6stopped7.2stopped

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
 EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
Basic Person Test3.3stopped6.2stopped4.8stopped
Element Collection Test10.0stopped5.5stopped7.7stopped
Inheritance Test3.9stopped7.6stopped5.8stopped
Indexing Test10.3stopped8.3stopped9.3stopped
Graph (Binary Tree) Test1.7stopped1.7stopped1.7stopped
Multithreading Test5.2stopped5.5stopped5.3stopped
All Tests5.8stopped5.8stopped5.8stopped

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
 EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
Basic Person Test12.9stopped12.2stopped12.5stopped
Element Collection Test12.6stopped1.1stopped6.8stopped
Inheritance Test14.1stopped7.6stopped10.9stopped
Indexing Test20.6stopped4.4stopped12.5stopped
Graph (Binary Tree) Test5.0stopped7.4stopped6.2stopped
Multithreading Test4.8stopped0.0000stopped2.4stopped
All Tests11.6stopped5.5stopped8.6stopped

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
 EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
EclipseLink
Derby embedded
Hibernate
HSQLDB server
Basic Person Test8.3stopped12.5stopped10.4stopped
Element Collection Test8.1stopped6.0stopped7.0stopped
Inheritance Test6.4stopped11.7stopped9.0stopped
Indexing Test12.2stopped15.2stopped13.7stopped
Graph (Binary Tree) Test2.8stopped3.8stopped3.3stopped
Multithreading Test8.0stopped9.7stopped8.8stopped
All Tests7.8stopped10.0stopped8.9stopped

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