Compare with

Comparison of EclipseLink with SQLite embedded vs DataNucleus with H2 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
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
Basic Person Test0.07419.20.908.00.4913.6
Element Collection Test0.0616.60.652.80.364.7
Inheritance Test0.08315.60.824.40.4510.0
Indexing Test0.1124.41.611.80.8718.1
Graph (Binary Tree) Test0.249.20.916.20.577.7
Multithreading Test0.1034.92.17.11.121.0
All Tests0.1118.31.26.70.6412.5

The results above show that in general DataNucleus with H2 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 H2 embedded database (12.5) reveals that in these tests, DataNucleus with H2 embedded is 19.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 DataNucleus with H2 embedded database (34.9) reveals that in that case, DataNucleus with H2 embedded is 349 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
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
Basic Person Testfailed13.2failed13.5failed13.3
Element Collection Test0.00076.4failed8.90.00077.7
Inheritance Testfailed12.2failed12.7failed12.4
Indexing Testfailed8.1failed16.5failed12.3
Graph (Binary Tree) Testfailed10.6failed20.9failed15.8
Multithreading Testfailed13.3failed9.9failed11.6
All Tests0.000710.6failed13.70.000712.2

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
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
Basic Person Test1.24.7failed1.41.23.1
Element Collection Test0.295.0failed2.40.293.7
Inheritance Test0.693.8failed1.60.692.7
Indexing Test0.00080.0041failed1.80.00080.91
Multithreading Testfailed1.2failed0.79failed1.0
All Tests0.553.0failed1.60.552.3

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
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
Basic Person Testfailed10.0failed3.9failed6.9
Element Collection Test0.00167.6failed3.90.00165.8
Inheritance Testfailed9.4failed4.4failed6.9
Indexing Testfailed10.6failed5.9failed8.2
Graph (Binary Tree) Testfailed5.9failed3.7failed4.8
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.00168.7failed4.40.00166.5

EclipseLink with SQLite embedded has failed in 11 tests (see exceptions). DataNucleus with H2 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
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 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) Testfailed5.6failed4.1failed4.8
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.00065.2failed2.00.00063.6

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
Basic Person Test79.427.079.427.079.427.0
Element Collection Test74.522.474.522.474.522.4
Inheritance Test75.027.075.027.075.027.0
Indexing Test92.931.694.532.193.731.9
Graph (Binary Tree) Test60.620.048.415.054.517.5
Multithreading Test10033.91009.210021.5
All Tests80.427.078.622.179.524.6

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

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
EclipseLink
SQLite embedded
DataNucleus
H2 embedded
Basic Person Test0.6610.30.905.60.747.9
Element Collection Test0.0706.10.653.90.175.0
Inheritance Test0.389.00.824.90.536.9
Indexing Test0.05810.11.67.60.588.9
Graph (Binary Tree) Test0.247.80.918.70.578.3
Multithreading Test0.1016.52.15.91.111.2
All Tests0.229.61.26.00.527.8

The results above show that in general DataNucleus with H2 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 H2 embedded database (7.8) reveals that in these tests, DataNucleus with H2 embedded is 15.0 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 DataNucleus with H2 embedded database (10.1) reveals that in that case, DataNucleus with H2 embedded is 174 times faster than EclipseLink with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons