Compare with

Comparison of Hibernate with PostgreSQL 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
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Basic Person Test7.10.0743.40.905.20.49
Element Collection Test2.90.0611.70.652.30.36
Inheritance Test7.00.0833.60.825.30.45
Indexing Test9.30.116.11.67.70.87
Graph (Binary Tree) Test3.00.242.90.912.90.57
Multithreading Test31.70.1013.92.122.81.1
All Tests10.20.115.31.27.70.64

The results above show that in general Hibernate with PostgreSQL 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 PostgreSQL database server (7.7) reveals that in these tests, Hibernate with PostgreSQL server is 12.0 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 PostgreSQL database server (31.7) reveals that in that case, Hibernate with PostgreSQL server is 317 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
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Basic Person Test5.5failed11.5failed8.5failed
Element Collection Test0.0250.00070.017failed0.0210.0007
Inheritance Test5.2failed14.0failed9.6failed
Indexing Test4.6failed13.3failed8.9failed
Graph (Binary Tree) Test0.61failed0.78failed0.70failed
Multithreading Test11.3failed17.0failed14.2failed
All Tests4.50.00079.4failed7.00.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
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Basic Person Test55.51.26.1failed30.81.2
Element Collection Test11.00.290.016failed5.50.29
Inheritance Test52.30.698.7failed30.50.69
Indexing Test0.0500.00088.8failed4.40.0008
Multithreading Test55.2failed9.2failed32.2failed
All Tests34.80.556.6failed20.70.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
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Basic Person Test5.3failed2.7failed4.0failed
Element Collection Test0.0670.00160.026failed0.0460.0016
Inheritance Test5.4failed3.8failed4.6failed
Indexing Test5.4failed4.3failed4.8failed
Graph (Binary Tree) Test1.1failed0.58failed0.82failed
Multithreading Test29.6failed6.3failed18.0failed
All Tests7.80.00162.9failed5.40.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
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Basic Person Test5.3failed4.2failed4.8failed
Element Collection Test0.0200.0006stoppedfailed0.00980.0006
Inheritance Test5.1failed4.2failed4.6failed
Indexing Test9.5failed6.3failed7.9failed
Graph (Binary Tree) Test0.012failed0.012failed0.012failed
Multithreading Test23.3failed21.8failed22.5failed
All Tests7.20.00066.1failed6.60.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
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Basic Person Test15.70.665.60.9010.70.74
Element Collection Test2.80.0700.350.651.60.17
Inheritance Test15.00.386.90.8210.90.53
Indexing Test5.80.0587.81.66.80.58
Graph (Binary Tree) Test1.20.241.10.911.10.57
Multithreading Test30.20.1013.62.121.91.1
All Tests12.10.226.01.29.10.52

The results above show that in general Hibernate with PostgreSQL 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 PostgreSQL database server (9.1) reveals that in these tests, Hibernate with PostgreSQL server is 17.5 times faster than EclipseLink with SQLite embedded.

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

Other Head to Head DBMS/JPA Comparisons