Compare with

Comparison of OpenJPA with Derby 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
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
Basic Person Test3.10.0742.70.902.90.49
Element Collection Test2.00.0611.70.651.80.36
Inheritance Test3.00.0832.30.822.60.45
Indexing Test4.70.114.11.64.40.87
Graph (Binary Tree) Test0.710.240.640.910.670.57
Multithreading Test6.00.103.82.14.91.1
All Tests3.30.112.51.22.90.64

The results above show that in general OpenJPA with Derby 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 Derby database server (2.9) reveals that in these tests, OpenJPA with Derby server is 4.5 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 Derby database server (6.0) reveals that in that case, OpenJPA with Derby server is 60.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
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
Basic Person Test0.78failed11.6failed6.2failed
Element Collection Test0.00240.00071.1failed0.540.0007
Inheritance Test0.014failed5.0failed2.5failed
Indexing Test0.62failed13.0failed6.8failed
Graph (Binary Tree) Test0.065failed0.39failed0.23failed
Multithreading Test1.6failed19.0failed10.3failed
All Tests0.510.00078.4failed4.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
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
Basic Person Test29.21.25.5failed17.31.2
Element Collection Test2.20.291.4failed1.80.29
Inheritance Test2.20.691.0failed1.60.69
Indexing Test2.20.000811.7failed7.00.0008
Multithreading Test35.5failed8.3failed21.9failed
All Tests14.30.555.6failed9.90.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
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
Basic Person Test1.5failed4.0failed2.8failed
Element Collection Test0.00810.00161.9failed0.940.0016
Inheritance Test0.043failed3.8failed1.9failed
Indexing Test1.8failed6.8failed4.3failed
Graph (Binary Tree) Test0.16failed0.27failed0.22failed
Multithreading Test6.9failed5.0failed5.9failed
All Tests1.70.00163.6failed2.70.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
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
Basic Person Test1.4failed3.7failed2.5failed
Element Collection Test0.00820.00061.4failed0.710.0006
Inheritance Test0.035failed2.5failed1.3failed
Indexing Test2.3failed3.5failed2.9failed
Graph (Binary Tree) Test0.13failed0.35failed0.24failed
Multithreading Test3.6failed4.0failed3.8failed
All Tests1.30.00062.6failed1.90.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
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
Basic Person Test7.20.665.50.906.40.74
Element Collection Test0.840.0701.50.651.20.17
Inheritance Test1.10.382.90.822.00.53
Indexing Test2.30.0587.81.65.10.58
Graph (Binary Tree) Test0.270.240.410.910.340.57
Multithreading Test10.70.108.02.19.41.1
All Tests3.90.224.51.24.20.52

The results above show that in general OpenJPA with Derby 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 Derby database server (4.2) reveals that in these tests, OpenJPA with Derby server is 8.1 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 Derby database server (10.7) reveals that in that case, OpenJPA with Derby server is 107 times faster than EclipseLink with SQLite embedded.

On the other hand, OpenJPA with Derby server is slower, for instance, when using graphs of objects with large transaction/retrieval size. Comparing the normalized speed of OpenJPA with Derby database server (0.41) to the normalized speed of EclipseLink with SQLite embedded database (0.91) reveals that in that case, OpenJPA with Derby server is 2.2 times slower than EclipseLink with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons