Compare with

Comparison of EclipseLink with SQLite embedded vs OpenJPA with Derby 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
 EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
Basic Person Test0.0744.80.902.90.493.9
Element Collection Test0.0612.80.651.90.362.4
Inheritance Test0.0834.10.822.40.453.3
Indexing Test0.116.11.64.10.875.1
Graph (Binary Tree) Test0.241.50.911.40.571.4
Multithreading Test0.108.72.13.31.16.0
All Tests0.114.71.22.70.643.7

The results above show that in general OpenJPA with Derby embedded 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 embedded database (3.7) reveals that in these tests, OpenJPA with Derby embedded is 5.8 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 embedded database (8.7) reveals that in that case, OpenJPA with Derby embedded is 87.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 embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
Basic Person Testfailed14.8failed22.6failed18.7
Element Collection Test0.00070.0031failed2.30.00071.2
Inheritance Testfailed0.015failed7.0failed3.5
Indexing Testfailed11.7failed26.5failed19.1
Graph (Binary Tree) Testfailed0.93failed1.2failed1.1
Multithreading Testfailed25.2failed28.6failed26.9
All Tests0.00078.8failed14.70.000711.7

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 embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
Basic Person Test1.249.7failed9.91.229.8
Element Collection Test0.292.7failed9.60.296.1
Inheritance Test0.692.3failed1.30.691.8
Indexing Test0.00087.0failed17.10.000812.1
Multithreading Testfailed40.9failed11.7failed26.3
All Tests0.5520.5failed9.90.5515.2

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 embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
Basic Person Testfailed5.6failed5.2failed5.4
Element Collection Test0.00160.0090failed2.20.00161.1
Inheritance Testfailed0.045failed4.6failed2.3
Indexing Testfailed6.1failed8.7failed7.4
Graph (Binary Tree) Testfailed1.6failed0.91failed1.3
Multithreading Testfailed18.3failed4.5failed11.4
All Tests0.00165.3failed4.40.00164.8

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 embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
Basic Person Testfailed4.2failed4.5failed4.3
Element Collection Test0.00060.0071failed1.60.00060.80
Inheritance Testfailed0.035failed3.0failed1.5
Indexing Testfailed5.3failed3.6failed4.4
Graph (Binary Tree) Testfailed0.80failed0.93failed0.86
Multithreading Testfailed5.7failed6.2failed6.0
All Tests0.00062.7failed3.30.00063.0

EclipseLink with SQLite embedded has failed in 11 tests (see exceptions).

Comparison of database storage efficiency (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
Basic Person Test79.452.879.452.879.452.8
Element Collection Test74.542.474.542.474.542.4
Inheritance Test75.044.275.044.275.044.2
Indexing Test92.953.194.554.093.753.5
Graph (Binary Tree) Test60.612.848.49.654.511.2
Multithreading Test10050.71009.710030.2
All Tests80.442.778.635.579.539.1

The results above show that in general EclipseLink with SQLite embedded is more efficient than OpenJPA with Derby embedded in using disk space. Comparing the normalized score of OpenJPA with Derby embedded database (39.1) to the normalized score of EclipseLink with SQLite embedded database (79.5) reveals that in these tests, EclipseLink with SQLite embedded is 2.0 times more efficient than OpenJPA with Derby embedded.

A huge gap has been detected when using multithreading with large transaction size. Comparing the normalized score of OpenJPA with Derby embedded database (9.7) to the normalized score of EclipseLink with SQLite embedded database (100) reveals that in that case, EclipseLink with SQLite embedded is 10.3 times more efficient than OpenJPA with Derby embedded.

Comparison of JPA/Database speed - the averages (normalized score, higher is better)

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
Basic Person Test0.6615.80.909.00.7412.4
Element Collection Test0.0701.10.653.50.172.3
Inheritance Test0.381.30.823.70.532.5
Indexing Test0.0587.21.612.00.589.6
Graph (Binary Tree) Test0.241.20.911.10.571.2
Multithreading Test0.1019.82.110.91.115.3
All Tests0.228.01.26.90.527.4

The results above show that in general OpenJPA with Derby embedded 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 embedded database (7.4) reveals that in these tests, OpenJPA with Derby embedded is 14.2 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 embedded database (19.8) reveals that in that case, OpenJPA with Derby embedded is 198 times faster than EclipseLink with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons