Compare with

Comparison of EclipseLink with SQLite embedded vs Hibernate 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
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
Basic Person Test0.0745.90.903.80.494.9
Element Collection Test0.0612.90.651.80.362.3
Inheritance Test0.0835.30.823.70.454.5
Indexing Test0.117.01.64.80.875.9
Graph (Binary Tree) Test0.241.90.911.70.571.8
Multithreading Test0.1010.52.13.71.17.1
All Tests0.115.61.23.30.644.4

The results above show that in general Hibernate 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 Hibernate with Derby embedded database (4.4) reveals that in these tests, Hibernate with Derby embedded is 6.9 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 Hibernate with Derby embedded database (10.5) reveals that in that case, Hibernate with Derby embedded is 105 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
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
Basic Person Testfailed14.2failed16.4failed15.3
Element Collection Test0.00074.4failed4.90.00074.6
Inheritance Testfailed10.3failed18.6failed14.4
Indexing Testfailed10.0failed16.4failed13.2
Graph (Binary Tree) Testfailed2.6failed3.0failed2.8
Multithreading Testfailed19.3failed19.3failed19.3
All Tests0.000710.1failed13.10.000711.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
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
Basic Person Test1.249.3failed6.81.228.1
Element Collection Test0.2937.6failed2.70.2920.1
Inheritance Test0.6924.1failed7.60.6915.9
Indexing Test0.00085.3failed14.80.000810.1
Multithreading Testfailed39.7failed6.1failed22.9
All Tests0.5531.2failed7.60.5519.4

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
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
Basic Person Testfailed4.5failed3.2failed3.8
Element Collection Test0.00163.9failed3.10.00163.5
Inheritance Testfailed4.6failed4.5failed4.5
Indexing Testfailed4.6failed5.5failed5.1
Graph (Binary Tree) Testfailed2.7failed1.2failed2.0
Multithreading Testfailed11.6failed2.6failed7.1
All Tests0.00165.3failed3.30.00164.3

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
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
Basic Person Testfailed3.8failed4.2failed4.0
Element Collection Test0.00062.3failed1.50.00061.9
Inheritance Testfailed4.0failed4.3failed4.2
Indexing Testfailed5.5failed3.6failed4.6
Graph (Binary Tree) Testfailed0.74failed0.96failed0.85
Multithreading Testfailed5.6failed4.9failed5.3
All Tests0.00063.7failed3.30.00063.5

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
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
Basic Person Test79.452.779.452.779.452.7
Element Collection Test74.542.374.542.374.542.3
Inheritance Test75.049.275.049.275.049.2
Indexing Test92.953.094.553.993.753.4
Graph (Binary Tree) Test60.613.148.49.854.511.5
Multithreading Test10049.31008.810029.0
All Tests80.443.378.636.179.539.7

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

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
Basic Person Test0.6615.50.906.90.7411.2
Element Collection Test0.07010.20.652.80.176.5
Inheritance Test0.389.70.827.70.538.7
Indexing Test0.0586.51.69.00.587.8
Graph (Binary Tree) Test0.242.00.911.70.571.8
Multithreading Test0.1017.32.17.31.112.3
All Tests0.2210.51.26.10.528.3

The results above show that in general Hibernate 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 Hibernate with Derby embedded database (8.3) reveals that in these tests, Hibernate with Derby embedded is 16.0 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 Hibernate with Derby embedded database (17.3) reveals that in that case, Hibernate with Derby embedded is 173 times faster than EclipseLink with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons