Compare with

Comparison of OpenJPA with Derby embedded 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 embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
Basic Person Test4.80.0742.90.903.90.49
Element Collection Test2.80.0611.90.652.40.36
Inheritance Test4.10.0832.40.823.30.45
Indexing Test6.10.114.11.65.10.87
Graph (Binary Tree) Test1.50.241.40.911.40.57
Multithreading Test8.70.103.32.16.01.1
All Tests4.70.112.71.23.70.64

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
 OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
Basic Person Test14.8failed22.6failed18.7failed
Element Collection Test0.00310.00072.3failed1.20.0007
Inheritance Test0.015failed7.0failed3.5failed
Indexing Test11.7failed26.5failed19.1failed
Graph (Binary Tree) Test0.93failed1.2failed1.1failed
Multithreading Test25.2failed28.6failed26.9failed
All Tests8.80.000714.7failed11.70.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 embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
Basic Person Test49.71.29.9failed29.81.2
Element Collection Test2.70.299.6failed6.10.29
Inheritance Test2.30.691.3failed1.80.69
Indexing Test7.00.000817.1failed12.10.0008
Multithreading Test40.9failed11.7failed26.3failed
All Tests20.50.559.9failed15.20.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 embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
Basic Person Test5.6failed5.2failed5.4failed
Element Collection Test0.00900.00162.2failed1.10.0016
Inheritance Test0.045failed4.6failed2.3failed
Indexing Test6.1failed8.7failed7.4failed
Graph (Binary Tree) Test1.6failed0.91failed1.3failed
Multithreading Test18.3failed4.5failed11.4failed
All Tests5.30.00164.4failed4.80.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 embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
Basic Person Test4.2failed4.5failed4.3failed
Element Collection Test0.00710.00061.6failed0.800.0006
Inheritance Test0.035failed3.0failed1.5failed
Indexing Test5.3failed3.6failed4.4failed
Graph (Binary Tree) Test0.80failed0.93failed0.86failed
Multithreading Test5.7failed6.2failed6.0failed
All Tests2.70.00063.3failed3.00.0006

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
 OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
Basic Person Test52.879.452.879.452.879.4
Element Collection Test42.474.542.474.542.474.5
Inheritance Test44.275.044.275.044.275.0
Indexing Test53.192.954.094.553.593.7
Graph (Binary Tree) Test12.860.69.648.411.254.5
Multithreading Test50.71009.710030.2100
All Tests42.780.435.578.639.179.5

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
 OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
OpenJPA
Derby embedded
EclipseLink
SQLite embedded
Basic Person Test15.80.669.00.9012.40.74
Element Collection Test1.10.0703.50.652.30.17
Inheritance Test1.30.383.70.822.50.53
Indexing Test7.20.05812.01.69.60.58
Graph (Binary Tree) Test1.20.241.10.911.20.57
Multithreading Test19.80.1010.92.115.31.1
All Tests8.00.226.91.27.40.52

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