Compare with

Comparison of OpenJPA with HSQLDB 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
HSQLDB embedded
EclipseLink
SQLite embedded
OpenJPA
HSQLDB embedded
EclipseLink
SQLite embedded
OpenJPA
HSQLDB embedded
EclipseLink
SQLite embedded
Basic Person Test13.30.0746.90.9010.10.49
Element Collection Test8.60.0615.30.657.00.36
Inheritance Test12.20.0835.80.829.00.45
Indexing Test16.70.119.11.612.90.87
Graph (Binary Tree) Test6.10.247.30.916.70.57
Multithreading Test26.80.107.02.116.91.1
All Tests13.90.116.91.210.40.64

The results above show that in general OpenJPA with HSQLDB 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 HSQLDB embedded database (10.4) reveals that in these tests, OpenJPA with HSQLDB embedded is 16.2 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 HSQLDB embedded database (26.8) reveals that in that case, OpenJPA with HSQLDB embedded is 268 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
HSQLDB embedded
EclipseLink
SQLite embedded
OpenJPA
HSQLDB embedded
EclipseLink
SQLite embedded
OpenJPA
HSQLDB embedded
EclipseLink
SQLite embedded
Basic Person Test21.8failed30.1failed25.9failed
Element Collection Test0.00680.00074.5failed2.20.0007
Inheritance Test0.0025failed2.0failed0.98failed
Indexing Test22.1failed43.6failed32.9failed
Graph (Binary Tree) Test2.1failed2.1failed2.1failed
Multithreading Test20.9failed23.5failed22.2failed
All Tests11.10.000717.6failed14.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
HSQLDB embedded
EclipseLink
SQLite embedded
OpenJPA
HSQLDB embedded
EclipseLink
SQLite embedded
OpenJPA
HSQLDB embedded
EclipseLink
SQLite embedded
Basic Person Test2.81.20.91failed1.91.2
Element Collection Test1.40.290.95failed1.20.29
Inheritance Test2.40.691.3failed1.80.69
Indexing Test15.40.000834.3failed24.90.0008
Multithreading Test1.4failed0.53failed0.95failed
All Tests4.70.557.6failed6.10.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
HSQLDB embedded
EclipseLink
SQLite embedded
OpenJPA
HSQLDB embedded
EclipseLink
SQLite embedded
OpenJPA
HSQLDB embedded
EclipseLink
SQLite embedded
Basic Person Test12.0failed5.3failed8.6failed
Element Collection Test0.0170.00163.7failed1.80.0016
Inheritance Test0.0098failed2.0failed0.99failed
Indexing Test9.3failed5.5failed7.4failed
Graph (Binary Tree) Test2.5failed1.6failed2.1failed
Multithreading Test20.0failed3.7failed11.8failed
All Tests7.30.00163.6failed5.50.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
HSQLDB embedded
EclipseLink
SQLite embedded
OpenJPA
HSQLDB embedded
EclipseLink
SQLite embedded
OpenJPA
HSQLDB embedded
EclipseLink
SQLite embedded
Basic Person Test21.3failed15.7failed18.5failed
Element Collection Test0.0110.00062.9failed1.50.0006
Inheritance Test0.0070failed3.5failed1.8failed
Indexing Test28.8failed15.2failed22.0failed
Graph (Binary Tree) Test2.9failed3.6failed3.2failed
Multithreading Test26.0failed19.6failed22.8failed
All Tests13.20.000610.1failed11.60.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
HSQLDB embedded
EclipseLink
SQLite embedded
OpenJPA
HSQLDB embedded
EclipseLink
SQLite embedded
OpenJPA
HSQLDB embedded
EclipseLink
SQLite embedded
Basic Person Test41.479.441.479.441.479.4
Element Collection Test46.974.546.974.546.974.5
Inheritance Test41.475.041.475.041.475.0
Indexing Test48.492.949.294.548.893.7
Graph (Binary Tree) Test28.560.621.448.425.054.5
Multithreading Test51.910010.310031.1100
All Tests43.180.435.178.639.179.5

The results above show that in general EclipseLink with SQLite embedded is more efficient than OpenJPA with HSQLDB embedded in using disk space. Comparing the normalized score of OpenJPA with HSQLDB 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 HSQLDB embedded.

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
HSQLDB embedded
EclipseLink
SQLite embedded
OpenJPA
HSQLDB embedded
EclipseLink
SQLite embedded
OpenJPA
HSQLDB embedded
EclipseLink
SQLite embedded
Basic Person Test14.30.6611.80.9013.00.74
Element Collection Test2.00.0703.50.652.70.17
Inheritance Test2.90.382.90.822.90.53
Indexing Test18.50.05821.61.620.00.58
Graph (Binary Tree) Test3.40.243.70.913.50.57
Multithreading Test19.00.1010.92.114.91.1
All Tests10.20.229.21.29.70.52

The results above show that in general OpenJPA with HSQLDB 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 HSQLDB embedded database (9.7) reveals that in these tests, OpenJPA with HSQLDB embedded is 18.7 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 HSQLDB embedded database (18.5) reveals that in that case, OpenJPA with HSQLDB embedded is 319 times faster than EclipseLink with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons