Compare with

Comparison of EclipseLink with SQLite embedded vs OpenJPA 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
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
Basic Person Test0.0745.20.904.80.495.0
Element Collection Test0.0612.80.652.20.362.5
Inheritance Test0.0834.60.823.20.453.9
Indexing Test0.117.41.66.90.877.1
Graph (Binary Tree) Test0.240.980.910.810.570.89
Multithreading Test0.1023.42.19.11.116.2
All Tests0.117.41.24.50.645.9

The results above show that in general OpenJPA 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 OpenJPA with PostgreSQL database server (5.9) reveals that in these tests, OpenJPA with PostgreSQL server is 9.2 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 OpenJPA with PostgreSQL database server (23.4) reveals that in that case, OpenJPA with PostgreSQL server is 234 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
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
Basic Person Testfailed5.8failed16.1failed10.9
Element Collection Test0.00070.013failed8.70.00074.4
Inheritance Testfailed5.2failed17.6failed11.4
Indexing Testfailed4.8failed18.7failed11.8
Graph (Binary Tree) Testfailed0.27failed0.35failed0.31
Multithreading Testfailed11.9failed23.3failed17.6
All Tests0.00074.7failed14.10.00079.4

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
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
Basic Person Test1.2failedfailedfailed1.2failed
Element Collection Test0.29failedfailedfailed0.29failed
Inheritance Test0.69failedfailedfailed0.69failed
Indexing Test0.0008failedfailedfailed0.0008failed
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.55failedfailedfailed0.55failed

EclipseLink with SQLite embedded has failed in 6 tests (see exceptions). OpenJPA with PostgreSQL server has failed in 10 tests (see exceptions).

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
Basic Person Testfailed4.9failed3.9failed4.4
Element Collection Test0.00160.033failed4.60.00162.3
Inheritance Testfailed4.8failed4.9failed4.9
Indexing Testfailed5.1failed6.0failed5.6
Graph (Binary Tree) Testfailed0.57failed0.31failed0.44
Multithreading Testfailed22.2failed7.4failed14.8
All Tests0.00166.3failed4.50.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
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
Basic Person Testfailed4.6failed5.3failed5.0
Element Collection Test0.00060.032failed2.80.00061.4
Inheritance Testfailed4.3failed4.6failed4.4
Indexing Testfailed8.0failed7.1failed7.5
Graph (Binary Tree) Testfailed0.53failed0.55failed0.54
Multithreading Testfailed17.4failed9.1failed13.3
All Tests0.00065.8failed4.90.00065.4

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
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
Basic Person Test0.665.10.907.50.746.3
Element Collection Test0.0700.720.654.60.172.6
Inheritance Test0.384.70.827.60.536.2
Indexing Test0.0586.31.69.70.588.0
Graph (Binary Tree) Test0.240.590.910.500.570.55
Multithreading Test0.1018.72.112.21.115.5
All Tests0.226.01.27.00.526.5

The results above show that in general OpenJPA 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 OpenJPA with PostgreSQL database server (6.5) reveals that in these tests, OpenJPA with PostgreSQL server is 12.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 OpenJPA with PostgreSQL database server (18.7) reveals that in that case, OpenJPA with PostgreSQL server is 187 times faster than EclipseLink with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons