Compare with

Comparison of EclipseLink with SQLite embedded vs Hibernate with MySQL 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
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
Basic Person Test0.0743.60.901.60.492.6
Element Collection Test0.0611.60.650.720.361.1
Inheritance Test0.0833.70.821.60.452.7
Indexing Test0.115.41.62.60.874.0
Graph (Binary Tree) Test0.241.50.911.20.571.4
Multithreading Test0.107.42.12.91.15.2
All Tests0.113.91.21.80.642.8

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
 EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
Basic Person Testfailed3.0failed11.0failed7.0
Element Collection Test0.00070.34failed1.20.00070.79
Inheritance Testfailed1.3failed14.5failed7.9
Indexing Testfailed2.5failed12.8failed7.6
Graph (Binary Tree) Testfailed0.55failed0.71failed0.63
Multithreading Testfailed0.23failed13.8failed7.0
All Tests0.00071.3failed9.00.00075.2

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
 EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
Basic Person Test1.210.0failed2.01.26.0
Element Collection Test0.296.7failed0.530.293.6
Inheritance Test0.692.8failed1.60.692.2
Indexing Test0.00080.44failed2.00.00081.2
Multithreading Testfailed2.1failed0.98failed1.5
All Tests0.554.4failed1.40.552.9

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
 EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
Basic Person Testfailed0.73failed1.6failed1.2
Element Collection Test0.00160.39failed1.20.00160.78
Inheritance Testfailed0.61failed2.1failed1.4
Indexing Testfailed0.81failed2.6failed1.7
Graph (Binary Tree) Testfailed0.69failed0.40failed0.54
Multithreading Testfailed0.63failed3.0failed1.8
All Tests0.00160.64failed1.80.00161.2

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
 EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
Basic Person Testfailed1.1failed1.7failed1.4
Element Collection Test0.00060.21failed0.530.00060.37
Inheritance Testfailed0.65failed1.8failed1.2
Indexing Testfailed0.81failed2.0failed1.4
Graph (Binary Tree) Testfailed0.55failed0.62failed0.58
Multithreading Testfailed0.35failed4.1failed2.2
All Tests0.00060.61failed1.80.00061.2

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
 EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
EclipseLink
SQLite embedded
Hibernate
MySQL server
Basic Person Test0.663.70.903.60.743.6
Element Collection Test0.0701.80.650.840.171.3
Inheritance Test0.381.80.824.30.533.1
Indexing Test0.0582.01.64.40.583.2
Graph (Binary Tree) Test0.240.830.910.730.570.78
Multithreading Test0.102.12.15.01.13.6
All Tests0.222.11.23.20.522.7

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