Compare with

Comparison of EclipseLink with SQLite embedded vs Hibernate with PostgreSQL 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
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
Basic Person Test0.0747.10.903.40.495.2
Element Collection Test0.0612.90.651.70.362.3
Inheritance Test0.0837.00.823.60.455.3
Indexing Test0.119.31.66.10.877.7
Graph (Binary Tree) Test0.243.00.912.90.572.9
Multithreading Test0.1031.72.113.91.122.8
All Tests0.1110.21.25.30.647.7

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
 EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
Basic Person Testfailed5.5failed11.5failed8.5
Element Collection Test0.00070.025failed0.0170.00070.021
Inheritance Testfailed5.2failed14.0failed9.6
Indexing Testfailed4.6failed13.3failed8.9
Graph (Binary Tree) Testfailed0.61failed0.78failed0.70
Multithreading Testfailed11.3failed17.0failed14.2
All Tests0.00074.5failed9.40.00077.0

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
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
Basic Person Test1.255.5failed6.11.230.8
Element Collection Test0.2911.0failed0.0160.295.5
Inheritance Test0.6952.3failed8.70.6930.5
Indexing Test0.00080.050failed8.80.00084.4
Multithreading Testfailed55.2failed9.2failed32.2
All Tests0.5534.8failed6.60.5520.7

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
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
Basic Person Testfailed5.3failed2.7failed4.0
Element Collection Test0.00160.067failed0.0260.00160.046
Inheritance Testfailed5.4failed3.8failed4.6
Indexing Testfailed5.4failed4.3failed4.8
Graph (Binary Tree) Testfailed1.1failed0.58failed0.82
Multithreading Testfailed29.6failed6.3failed18.0
All Tests0.00167.8failed2.90.00165.4

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
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
Basic Person Testfailed5.3failed4.2failed4.8
Element Collection Test0.00060.020failedstopped0.00060.0098
Inheritance Testfailed5.1failed4.2failed4.6
Indexing Testfailed9.5failed6.3failed7.9
Graph (Binary Tree) Testfailed0.012failed0.012failed0.012
Multithreading Testfailed23.3failed21.8failed22.5
All Tests0.00067.2failed6.10.00066.6

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
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
EclipseLink
SQLite embedded
Hibernate
PostgreSQL server
Basic Person Test0.6615.70.905.60.7410.7
Element Collection Test0.0702.80.650.350.171.6
Inheritance Test0.3815.00.826.90.5310.9
Indexing Test0.0585.81.67.80.586.8
Graph (Binary Tree) Test0.241.20.911.10.571.1
Multithreading Test0.1030.22.113.61.121.9
All Tests0.2212.11.26.00.529.1

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