Compare with

Comparison of EclipseLink with SQLite embedded vs OpenJPA with H2 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
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
Basic Person Test0.0743.70.902.20.492.9
Element Collection Test0.0612.60.651.50.362.1
Inheritance Test0.0834.50.822.00.453.2
Indexing Test0.117.31.63.60.875.4
Graph (Binary Tree) Test0.241.10.910.840.570.97
Multithreading Test0.107.72.14.21.15.9
All Tests0.114.51.22.40.643.4

The results above show that in general OpenJPA with H2 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 H2 database server (3.4) reveals that in these tests, OpenJPA with H2 server is 5.3 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 H2 database server (7.7) reveals that in that case, OpenJPA with H2 server is 77.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
OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
Basic Person Testfailed2.9failed7.6failed5.2
Element Collection Test0.00070.0022failed1.90.00070.93
Inheritance Testfailed0.013failed4.0failed2.0
Indexing Testfailed4.1failed8.8failed6.5
Graph (Binary Tree) Testfailed0.38failed0.49failed0.44
Multithreading Testfailed5.9failed14.0failed10.0
All Tests0.00072.2failed6.10.00074.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
OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
Basic Person Test1.23.7failed1.01.22.4
Element Collection Test0.292.0failed1.20.291.6
Inheritance Test0.692.8failed1.10.692.0
Indexing Test0.00083.8failed7.50.00085.7
Multithreading Testfailed0.98failed1.0failed1.0
All Tests0.552.7failed2.40.552.5

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
OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
Basic Person Testfailed3.0failed2.0failed2.5
Element Collection Test0.00160.0078failed1.90.00160.94
Inheritance Testfailed0.034failed2.8failed1.4
Indexing Testfailed2.8failed3.2failed3.0
Graph (Binary Tree) Testfailed0.79failed0.43failed0.61
Multithreading Testfailed7.0failed2.5failed4.8
All Tests0.00162.3failed2.10.00162.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
OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
Basic Person Testfailed3.2failed2.2failed2.7
Element Collection Test0.00060.0060failed0.880.00060.44
Inheritance Testfailed0.030failed3.1failed1.6
Indexing Testfailed6.5failed3.6failed5.1
Graph (Binary Tree) Testfailed0.73failed0.75failed0.74
Multithreading Testfailed7.6failed5.2failed6.4
All Tests0.00063.0failed2.60.00062.8

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
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
Basic Person Test0.663.30.903.00.743.1
Element Collection Test0.0700.930.651.50.171.2
Inheritance Test0.381.50.822.60.532.0
Indexing Test0.0584.91.65.40.585.1
Graph (Binary Tree) Test0.240.750.910.630.570.69
Multithreading Test0.105.92.15.41.15.6
All Tests0.222.91.23.20.523.0

The results above show that in general OpenJPA with H2 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 H2 database server (3.0) reveals that in these tests, OpenJPA with H2 server is 5.8 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 OpenJPA with H2 database server (4.9) reveals that in that case, OpenJPA with H2 server is 84.5 times faster than EclipseLink with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons