Compare with

Comparison of OpenJPA 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
 OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
Basic Person Test5.20.0744.80.905.00.49
Element Collection Test2.80.0612.20.652.50.36
Inheritance Test4.60.0833.20.823.90.45
Indexing Test7.40.116.91.67.10.87
Graph (Binary Tree) Test0.980.240.810.910.890.57
Multithreading Test23.40.109.12.116.21.1
All Tests7.40.114.51.25.90.64

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
 OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
Basic Person Test5.8failed16.1failed10.9failed
Element Collection Test0.0130.00078.7failed4.40.0007
Inheritance Test5.2failed17.6failed11.4failed
Indexing Test4.8failed18.7failed11.8failed
Graph (Binary Tree) Test0.27failed0.35failed0.31failed
Multithreading Test11.9failed23.3failed17.6failed
All Tests4.70.000714.1failed9.40.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
 OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
Basic Person Testfailed1.2failedfailedfailed1.2
Element Collection Testfailed0.29failedfailedfailed0.29
Inheritance Testfailed0.69failedfailedfailed0.69
Indexing Testfailed0.0008failedfailedfailed0.0008
Multithreading Testfailedfailedfailedfailedfailedfailed
All Testsfailed0.55failedfailedfailed0.55

OpenJPA with PostgreSQL server has failed in 10 tests (see exceptions). 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
 OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
Basic Person Test4.9failed3.9failed4.4failed
Element Collection Test0.0330.00164.6failed2.30.0016
Inheritance Test4.8failed4.9failed4.9failed
Indexing Test5.1failed6.0failed5.6failed
Graph (Binary Tree) Test0.57failed0.31failed0.44failed
Multithreading Test22.2failed7.4failed14.8failed
All Tests6.30.00164.5failed5.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
 OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
Basic Person Test4.6failed5.3failed5.0failed
Element Collection Test0.0320.00062.8failed1.40.0006
Inheritance Test4.3failed4.6failed4.4failed
Indexing Test8.0failed7.1failed7.5failed
Graph (Binary Tree) Test0.53failed0.55failed0.54failed
Multithreading Test17.4failed9.1failed13.3failed
All Tests5.80.00064.9failed5.40.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
 OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
OpenJPA
PostgreSQL server
EclipseLink
SQLite embedded
Basic Person Test5.10.667.50.906.30.74
Element Collection Test0.720.0704.60.652.60.17
Inheritance Test4.70.387.60.826.20.53
Indexing Test6.30.0589.71.68.00.58
Graph (Binary Tree) Test0.590.240.500.910.550.57
Multithreading Test18.70.1012.22.115.51.1
All Tests6.00.227.01.26.50.52

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