Compare with

Comparison of OpenJPA with H2 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
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
Basic Person Test3.70.0742.20.902.90.49
Element Collection Test2.60.0611.50.652.10.36
Inheritance Test4.50.0832.00.823.20.45
Indexing Test7.30.113.61.65.40.87
Graph (Binary Tree) Test1.10.240.840.910.970.57
Multithreading Test7.70.104.22.15.91.1
All Tests4.50.112.41.23.40.64

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
 OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
Basic Person Test2.9failed7.6failed5.2failed
Element Collection Test0.00220.00071.9failed0.930.0007
Inheritance Test0.013failed4.0failed2.0failed
Indexing Test4.1failed8.8failed6.5failed
Graph (Binary Tree) Test0.38failed0.49failed0.44failed
Multithreading Test5.9failed14.0failed10.0failed
All Tests2.20.00076.1failed4.20.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
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
Basic Person Test3.71.21.0failed2.41.2
Element Collection Test2.00.291.2failed1.60.29
Inheritance Test2.80.691.1failed2.00.69
Indexing Test3.80.00087.5failed5.70.0008
Multithreading Test0.98failed1.0failed1.0failed
All Tests2.70.552.4failed2.50.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
 OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
Basic Person Test3.0failed2.0failed2.5failed
Element Collection Test0.00780.00161.9failed0.940.0016
Inheritance Test0.034failed2.8failed1.4failed
Indexing Test2.8failed3.2failed3.0failed
Graph (Binary Tree) Test0.79failed0.43failed0.61failed
Multithreading Test7.0failed2.5failed4.8failed
All Tests2.30.00162.1failed2.20.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
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
Basic Person Test3.2failed2.2failed2.7failed
Element Collection Test0.00600.00060.88failed0.440.0006
Inheritance Test0.030failed3.1failed1.6failed
Indexing Test6.5failed3.6failed5.1failed
Graph (Binary Tree) Test0.73failed0.75failed0.74failed
Multithreading Test7.6failed5.2failed6.4failed
All Tests3.00.00062.6failed2.80.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
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
OpenJPA
H2 server
EclipseLink
SQLite embedded
Basic Person Test3.30.663.00.903.10.74
Element Collection Test0.930.0701.50.651.20.17
Inheritance Test1.50.382.60.822.00.53
Indexing Test4.90.0585.41.65.10.58
Graph (Binary Tree) Test0.750.240.630.910.690.57
Multithreading Test5.90.105.42.15.61.1
All Tests2.90.223.21.23.00.52

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