Compare with

Comparison of EclipseLink with H2 server 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 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
Basic Person Test12.6stopped9.5stopped11.1stopped
Element Collection Test12.5stopped6.6stopped9.5stopped
Inheritance Test6.5stopped10.5stopped8.5stopped
Indexing Test12.2stopped12.3stopped12.3stopped
Graph (Binary Tree) Test8.3stopped7.3stopped7.8stopped
Multithreading Test11.5stopped0.0000stopped5.8stopped
All Tests10.6stopped7.7stopped9.2stopped

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
 EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
Basic Person Test2.8stopped6.6stopped4.7stopped
Element Collection Test1.5stopped1.8stopped1.7stopped
Inheritance Test2.1stopped7.9stopped5.0stopped
Indexing Test2.4stopped8.0stopped5.2stopped
Graph (Binary Tree) Test0.38stopped0.81stopped0.60stopped
Multithreading Test4.7stopped11.2stopped8.0stopped
All Tests2.3stopped6.0stopped4.2stopped

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
 EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
Basic Person Test1.2stopped3.1stopped2.2stopped
Element Collection Test1.8stopped1.9stopped1.9stopped
Inheritance Test0.75stopped3.3stopped2.0stopped
Indexing Test2.1stopped3.5stopped2.8stopped
Multithreading Test3.6stopped6.7stopped5.1stopped
All Tests1.9stopped3.7stopped2.8stopped

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
 EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
Basic Person Test2.1stopped2.8stopped2.4stopped
Element Collection Test4.8stopped1.9stopped3.4stopped
Inheritance Test2.1stopped3.0stopped2.6stopped
Indexing Test5.5stopped4.4stopped5.0stopped
Graph (Binary Tree) Test1.0stopped0.73stopped0.89stopped
Multithreading Test2.7stopped1.4stopped2.0stopped
All Tests3.0stopped2.4stopped2.7stopped

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
 EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
Basic Person Test12.1stopped9.6stopped10.9stopped
Element Collection Test8.3stopped1.2stopped4.8stopped
Inheritance Test13.7stopped7.4stopped10.6stopped
Indexing Test23.0stopped7.0stopped15.0stopped
Graph (Binary Tree) Test7.5stopped10.9stopped9.2stopped
Multithreading Test7.0stopped0.0000stopped3.5stopped
All Tests11.9stopped6.0stopped9.0stopped

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
 EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
EclipseLink
H2 server
Hibernate
HSQLDB server
Basic Person Test6.2stopped6.3stopped6.2stopped
Element Collection Test5.8stopped2.7stopped4.2stopped
Inheritance Test5.0stopped6.4stopped5.7stopped
Indexing Test9.0stopped7.0stopped8.0stopped
Graph (Binary Tree) Test4.3stopped4.9stopped4.6stopped
Multithreading Test5.9stopped3.9stopped4.9stopped
All Tests6.1stopped5.2stopped5.7stopped

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