Compare with

Comparison of EclipseLink with MySQL 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
MySQL server
Hibernate
HSQLDB server
EclipseLink
MySQL server
Hibernate
HSQLDB server
EclipseLink
MySQL server
Hibernate
HSQLDB server
Basic Person Test1.7stopped7.1stopped4.4stopped
Element Collection Test1.4stopped5.0stopped3.2stopped
Inheritance Test0.93stopped7.3stopped4.1stopped
Indexing Test1.5stopped8.6stopped5.1stopped
Graph (Binary Tree) Test3.7stopped4.5stopped4.1stopped
Multithreading Test1.1stopped0.0000stopped0.55stopped
All Tests1.7stopped5.4stopped3.6stopped

The results above show that in general EclipseLink with MySQL 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 MySQL database server (3.6) reveals that in these tests, EclipseLink with MySQL 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
MySQL server
Hibernate
HSQLDB server
EclipseLink
MySQL server
Hibernate
HSQLDB server
EclipseLink
MySQL server
Hibernate
HSQLDB server
Basic Person Test2.2stopped15.1stopped8.7stopped
Element Collection Test0.92stopped0.89stopped0.91stopped
Inheritance Test2.9stopped12.5stopped7.7stopped
Indexing Test2.1stopped11.5stopped6.8stopped
Graph (Binary Tree) Test0.22stopped0.44stopped0.33stopped
Multithreading Test3.5stopped4.9stopped4.2stopped
All Tests2.0stopped7.6stopped4.8stopped

The results above show that in general EclipseLink with MySQL 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 MySQL database server (4.8) reveals that in these tests, EclipseLink with MySQL 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
MySQL server
Hibernate
HSQLDB server
EclipseLink
MySQL server
Hibernate
HSQLDB server
EclipseLink
MySQL server
Hibernate
HSQLDB server
Basic Person Test0.17stopped1.4stopped0.80stopped
Element Collection Test0.43stopped0.66stopped0.54stopped
Inheritance Test0.19stopped1.4stopped0.81stopped
Indexing Test2.2stopped4.7stopped3.5stopped
Multithreading Test1.0stopped2.3stopped1.7stopped
All Tests0.81stopped2.1stopped1.5stopped

The results above show that in general EclipseLink with MySQL 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 MySQL database server (1.5) reveals that in these tests, EclipseLink with MySQL 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
MySQL server
Hibernate
HSQLDB server
EclipseLink
MySQL server
Hibernate
HSQLDB server
EclipseLink
MySQL server
Hibernate
HSQLDB server
Basic Person Test0.20stopped0.67stopped0.43stopped
Element Collection Test0.40stopped0.78stopped0.59stopped
Inheritance Test0.20stopped1.1stopped0.63stopped
Indexing Test0.65stopped1.2stopped0.92stopped
Graph (Binary Tree) Test0.24stopped0.20stopped0.22stopped
Multithreading Test0.22stopped1.6stopped0.89stopped
All Tests0.32stopped0.91stopped0.61stopped

The results above show that in general EclipseLink with MySQL 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 MySQL database server (0.61) reveals that in these tests, EclipseLink with MySQL 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
MySQL server
Hibernate
HSQLDB server
EclipseLink
MySQL server
Hibernate
HSQLDB server
EclipseLink
MySQL server
Hibernate
HSQLDB server
Basic Person Test0.98stopped3.8stopped2.4stopped
Element Collection Test1.3stopped0.65stopped0.96stopped
Inheritance Test1.2stopped2.7stopped2.0stopped
Indexing Test1.8stopped3.8stopped2.8stopped
Graph (Binary Tree) Test3.6stopped6.3stopped4.9stopped
Multithreading Test0.80stopped0.0000stopped0.40stopped
All Tests1.6stopped2.9stopped2.2stopped

The results above show that in general EclipseLink with MySQL 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 MySQL database server (2.2) reveals that in these tests, EclipseLink with MySQL 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
MySQL server
Hibernate
HSQLDB server
EclipseLink
MySQL server
Hibernate
HSQLDB server
EclipseLink
MySQL server
Hibernate
HSQLDB server
Basic Person Test1.0stopped5.6stopped3.3stopped
Element Collection Test0.89stopped1.6stopped1.2stopped
Inheritance Test1.1stopped5.0stopped3.0stopped
Indexing Test1.7stopped6.0stopped3.8stopped
Graph (Binary Tree) Test1.9stopped2.9stopped2.4stopped
Multithreading Test1.3stopped1.7stopped1.5stopped
All Tests1.3stopped3.8stopped2.6stopped

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

Other Head to Head DBMS/JPA Comparisons