Compare with

Comparison of EclipseLink with H2 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
H2 embedded
Hibernate
HSQLDB server
EclipseLink
H2 embedded
Hibernate
HSQLDB server
EclipseLink
H2 embedded
Hibernate
HSQLDB server
Basic Person Test15.4stopped12.9stopped14.2stopped
Element Collection Test14.1stopped8.4stopped11.3stopped
Inheritance Test8.4stopped9.7stopped9.1stopped
Indexing Test15.5stopped14.2stopped14.9stopped
Graph (Binary Tree) Test8.5stopped7.1stopped7.8stopped
Multithreading Test12.3stopped0.0000stopped6.1stopped
All Tests12.4stopped8.7stopped10.5stopped

The results above show that in general EclipseLink with H2 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 H2 embedded database (10.5) reveals that in these tests, EclipseLink with H2 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
H2 embedded
Hibernate
HSQLDB server
EclipseLink
H2 embedded
Hibernate
HSQLDB server
EclipseLink
H2 embedded
Hibernate
HSQLDB server
Basic Person Test18.6stopped30.2stopped24.4stopped
Element Collection Test16.3stopped21.5stopped18.9stopped
Inheritance Test19.7stopped27.1stopped23.4stopped
Indexing Test17.9stopped29.1stopped23.5stopped
Graph (Binary Tree) Test5.9stopped18.3stopped12.1stopped
Multithreading Test26.9stopped39.9stopped33.4stopped
All Tests17.6stopped27.7stopped22.6stopped

The results above show that in general EclipseLink with H2 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 H2 embedded database (22.6) reveals that in these tests, EclipseLink with H2 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
H2 embedded
Hibernate
HSQLDB server
EclipseLink
H2 embedded
Hibernate
HSQLDB server
EclipseLink
H2 embedded
Hibernate
HSQLDB server
Basic Person Test3.5stopped12.2stopped7.8stopped
Element Collection Test7.6stopped10.1stopped8.9stopped
Inheritance Test2.2stopped12.3stopped7.3stopped
Indexing Test11.5stopped21.6stopped16.6stopped
Multithreading Test3.2stopped12.0stopped7.6stopped
All Tests5.6stopped13.6stopped9.6stopped

The results above show that in general EclipseLink with H2 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 H2 embedded database (9.6) reveals that in these tests, EclipseLink with H2 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
H2 embedded
Hibernate
HSQLDB server
EclipseLink
H2 embedded
Hibernate
HSQLDB server
EclipseLink
H2 embedded
Hibernate
HSQLDB server
Basic Person Test21.0stopped9.3stopped15.1stopped
Element Collection Test26.7stopped12.3stopped19.5stopped
Inheritance Test15.6stopped14.0stopped14.8stopped
Indexing Test53.2stopped12.4stopped32.8stopped
Graph (Binary Tree) Test11.4stopped6.1stopped8.7stopped
Multithreading Test14.9stopped6.6stopped10.7stopped
All Tests23.8stopped10.1stopped17.0stopped

The results above show that in general EclipseLink with H2 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 H2 embedded database (17.0) reveals that in these tests, EclipseLink with H2 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
H2 embedded
Hibernate
HSQLDB server
EclipseLink
H2 embedded
Hibernate
HSQLDB server
EclipseLink
H2 embedded
Hibernate
HSQLDB server
Basic Person Test43.5stopped29.0stopped36.2stopped
Element Collection Test31.5stopped3.9stopped17.7stopped
Inheritance Test49.9stopped20.7stopped35.3stopped
Indexing Test83.8stopped15.9stopped49.9stopped
Graph (Binary Tree) Test35.3stopped39.8stopped37.6stopped
Multithreading Test28.0stopped0.0000stopped14.0stopped
All Tests45.3stopped18.2stopped31.8stopped

The results above show that in general EclipseLink with H2 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 H2 embedded database (31.8) reveals that in these tests, EclipseLink with H2 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
H2 embedded
Hibernate
HSQLDB server
EclipseLink
H2 embedded
Hibernate
HSQLDB server
EclipseLink
H2 embedded
Hibernate
HSQLDB server
Basic Person Test20.4stopped18.7stopped19.6stopped
Element Collection Test19.2stopped11.2stopped15.2stopped
Inheritance Test19.2stopped16.8stopped18.0stopped
Indexing Test36.4stopped18.7stopped27.5stopped
Graph (Binary Tree) Test15.3stopped17.8stopped16.5stopped
Multithreading Test17.0stopped11.7stopped14.4stopped
All Tests21.5stopped15.7stopped18.6stopped

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

Other Head to Head DBMS/JPA Comparisons