Compare with

Comparison of Hibernate with MySQL server vs EclipseLink with SQLite embedded

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
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Basic Person Test3.60.0741.60.902.60.49
Element Collection Test1.60.0610.720.651.10.36
Inheritance Test3.70.0831.60.822.70.45
Indexing Test5.40.112.61.64.00.87
Graph (Binary Tree) Test1.50.241.20.911.40.57
Multithreading Test7.40.102.92.15.21.1
All Tests3.90.111.81.22.80.64

The results above show that in general Hibernate with MySQL server is much more efficient than EclipseLink with SQLite embedded in persisting JPA entity objects to the database. Comparing the normalized speed of EclipseLink with SQLite embedded database (0.64) to the normalized speed of Hibernate with MySQL database server (2.8) reveals that in these tests, Hibernate with MySQL server is 4.4 times faster than EclipseLink with SQLite embedded.

A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with SQLite embedded database (0.10) to the normalized speed of Hibernate with MySQL database server (7.4) reveals that in that case, Hibernate with MySQL server is 74.0 times faster than EclipseLink with SQLite embedded.

Speed comparison of JPA database retrieval operations (normalized score, higher is better)

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Basic Person Test3.0failed11.0failed7.0failed
Element Collection Test0.340.00071.2failed0.790.0007
Inheritance Test1.3failed14.5failed7.9failed
Indexing Test2.5failed12.8failed7.6failed
Graph (Binary Tree) Test0.55failed0.71failed0.63failed
Multithreading Test0.23failed13.8failed7.0failed
All Tests1.30.00079.0failed5.20.0007

EclipseLink with SQLite embedded has failed in 11 tests (see exceptions).

Speed comparison of JPA database query operations (normalized score, higher is better)

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Basic Person Test10.01.22.0failed6.01.2
Element Collection Test6.70.290.53failed3.60.29
Inheritance Test2.80.691.6failed2.20.69
Indexing Test0.440.00082.0failed1.20.0008
Multithreading Test2.1failed0.98failed1.5failed
All Tests4.40.551.4failed2.90.55

EclipseLink with SQLite embedded has failed in 6 tests (see exceptions).

Speed comparison of JPA database update operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Basic Person Test0.73failed1.6failed1.2failed
Element Collection Test0.390.00161.2failed0.780.0016
Inheritance Test0.61failed2.1failed1.4failed
Indexing Test0.81failed2.6failed1.7failed
Graph (Binary Tree) Test0.69failed0.40failed0.54failed
Multithreading Test0.63failed3.0failed1.8failed
All Tests0.640.00161.8failed1.20.0016

EclipseLink with SQLite embedded has failed in 11 tests (see exceptions).

Speed comparison of JPA database removal operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Basic Person Test1.1failed1.7failed1.4failed
Element Collection Test0.210.00060.53failed0.370.0006
Inheritance Test0.65failed1.8failed1.2failed
Indexing Test0.81failed2.0failed1.4failed
Graph (Binary Tree) Test0.55failed0.62failed0.58failed
Multithreading Test0.35failed4.1failed2.2failed
All Tests0.610.00061.8failed1.20.0006

EclipseLink with SQLite embedded has failed in 11 tests (see exceptions).

Comparison of JPA/Database speed - the averages (normalized score, higher is better)

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Basic Person Test3.70.663.60.903.60.74
Element Collection Test1.80.0700.840.651.30.17
Inheritance Test1.80.384.30.823.10.53
Indexing Test2.00.0584.41.63.20.58
Graph (Binary Tree) Test0.830.240.730.910.780.57
Multithreading Test2.10.105.02.13.61.1
All Tests2.10.223.21.22.70.52

The results above show that in general Hibernate with MySQL server is much more efficient than EclipseLink with SQLite embedded in performing JPA database operations. Comparing the normalized speed of EclipseLink with SQLite embedded database (0.52) to the normalized speed of Hibernate with MySQL database server (2.7) reveals that in these tests, Hibernate with MySQL server is 5.2 times faster than EclipseLink with SQLite embedded.

A huge performance gap has been detected when using database indexes with small transaction/retrieval size. Comparing the normalized speed of EclipseLink with SQLite embedded database (0.058) to the normalized speed of Hibernate with MySQL database server (2.0) reveals that in that case, Hibernate with MySQL server is 34.5 times faster than EclipseLink with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons