Compare with

Comparison of EclipseLink with SQLite embedded vs OpenJPA with Derby 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
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
Basic Person Test0.0743.10.902.70.492.9
Element Collection Test0.0612.00.651.70.361.8
Inheritance Test0.0833.00.822.30.452.6
Indexing Test0.114.71.64.10.874.4
Graph (Binary Tree) Test0.240.710.910.640.570.67
Multithreading Test0.106.02.13.81.14.9
All Tests0.113.31.22.50.642.9

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
 EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
Basic Person Testfailed0.78failed11.6failed6.2
Element Collection Test0.00070.0024failed1.10.00070.54
Inheritance Testfailed0.014failed5.0failed2.5
Indexing Testfailed0.62failed13.0failed6.8
Graph (Binary Tree) Testfailed0.065failed0.39failed0.23
Multithreading Testfailed1.6failed19.0failed10.3
All Tests0.00070.51failed8.40.00074.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
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
Basic Person Test1.229.2failed5.51.217.3
Element Collection Test0.292.2failed1.40.291.8
Inheritance Test0.692.2failed1.00.691.6
Indexing Test0.00082.2failed11.70.00087.0
Multithreading Testfailed35.5failed8.3failed21.9
All Tests0.5514.3failed5.60.559.9

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
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
Basic Person Testfailed1.5failed4.0failed2.8
Element Collection Test0.00160.0081failed1.90.00160.94
Inheritance Testfailed0.043failed3.8failed1.9
Indexing Testfailed1.8failed6.8failed4.3
Graph (Binary Tree) Testfailed0.16failed0.27failed0.22
Multithreading Testfailed6.9failed5.0failed5.9
All Tests0.00161.7failed3.60.00162.7

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
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
Basic Person Testfailed1.4failed3.7failed2.5
Element Collection Test0.00060.0082failed1.40.00060.71
Inheritance Testfailed0.035failed2.5failed1.3
Indexing Testfailed2.3failed3.5failed2.9
Graph (Binary Tree) Testfailed0.13failed0.35failed0.24
Multithreading Testfailed3.6failed4.0failed3.8
All Tests0.00061.3failed2.60.00061.9

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
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
EclipseLink
SQLite embedded
OpenJPA
Derby server
Basic Person Test0.667.20.905.50.746.4
Element Collection Test0.0700.840.651.50.171.2
Inheritance Test0.381.10.822.90.532.0
Indexing Test0.0582.31.67.80.585.1
Graph (Binary Tree) Test0.240.270.910.410.570.34
Multithreading Test0.1010.72.18.01.19.4
All Tests0.223.91.24.50.524.2

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