Compare with

Comparison of EclipseLink with SQLite embedded vs DataNucleus with HSQLDB 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
DataNucleus
HSQLDB embedded
EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
Basic Person Test0.07414.20.904.80.499.5
Element Collection Test0.0616.60.652.10.364.3
Inheritance Test0.08313.60.824.60.459.1
Indexing Test0.1124.61.611.10.8717.8
Graph (Binary Tree) Test0.246.80.914.50.575.7
Multithreading Test0.1038.52.18.51.123.5
All Tests0.1117.41.25.90.6411.7

The results above show that in general DataNucleus 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 DataNucleus with HSQLDB embedded database (11.7) reveals that in these tests, DataNucleus with HSQLDB embedded is 18.3 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 DataNucleus with HSQLDB embedded database (38.5) reveals that in that case, DataNucleus with HSQLDB embedded is 385 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
DataNucleus
HSQLDB embedded
EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
Basic Person Testfailed6.6failed10.2failed8.4
Element Collection Test0.00073.6failed8.10.00075.8
Inheritance Testfailed5.7failed8.8failed7.2
Indexing Testfailed5.1failed9.5failed7.3
Graph (Binary Tree) Testfailed7.2failed9.3failed8.3
Multithreading Testfailed8.1failed9.5failed8.8
All Tests0.00076.0failed9.20.00077.6

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
DataNucleus
HSQLDB embedded
EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
Basic Person Test1.21.4failed0.481.20.95
Element Collection Test0.291.3failed0.670.291.0
Inheritance Test0.691.6failed0.610.691.1
Indexing Test0.00080.0016failed0.630.00080.32
Multithreading Testfailed0.40failedfailedfailed0.40
All Tests0.550.96failed0.600.550.80

EclipseLink with SQLite embedded has failed in 6 tests (see exceptions). DataNucleus with HSQLDB embedded has failed in 1 tests (see exceptions).

Speed comparison of JPA database update operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
Basic Person Testfailed11.5failed2.7failed7.1
Element Collection Test0.00166.9failed2.70.00164.8
Inheritance Testfailed10.3failed3.6failed6.9
Indexing Testfailed11.4failed4.4failed7.9
Graph (Binary Tree) Testfailed3.5failed1.5failed2.5
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.00168.7failed3.00.00165.8

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

Speed comparison of JPA database removal operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
Basic Person Testfailed4.2failed1.3failed2.8
Element Collection Test0.00064.9failed1.60.00063.2
Inheritance Testfailed4.0failed1.3failed2.7
Indexing Testfailed7.5failed1.9failed4.7
Graph (Binary Tree) Testfailed2.9failed2.0failed2.5
Multithreading Testfailed40.1failed13.7failed26.9
All Tests0.000610.6failed3.70.00067.1

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
DataNucleus
HSQLDB embedded
EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
Basic Person Test79.441.479.441.479.441.4
Element Collection Test74.523.474.523.474.523.4
Inheritance Test75.041.475.041.475.041.4
Indexing Test92.948.494.549.293.748.8
Graph (Binary Tree) Test60.612.548.49.454.510.9
Multithreading Test10051.910010.310031.1
All Tests80.436.578.629.279.532.9

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

A large gap has been detected when using multithreading with large transaction size. Comparing the normalized score of DataNucleus 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 DataNucleus with HSQLDB embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
EclipseLink
SQLite embedded
DataNucleus
HSQLDB embedded
Basic Person Test0.667.60.903.90.745.7
Element Collection Test0.0704.70.653.00.173.8
Inheritance Test0.387.10.823.80.535.4
Indexing Test0.0589.71.65.50.587.6
Graph (Binary Tree) Test0.245.10.914.30.574.7
Multithreading Test0.1021.82.110.61.117.0
All Tests0.229.01.24.80.527.0

The results above show that in general DataNucleus 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 DataNucleus with HSQLDB embedded database (7.0) reveals that in these tests, DataNucleus with HSQLDB embedded is 13.5 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 DataNucleus with HSQLDB embedded database (21.8) reveals that in that case, DataNucleus with HSQLDB embedded is 218 times faster than EclipseLink with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons