Compare with

Comparison of Hibernate 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
 Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Basic Person Test5.90.0743.80.904.90.49
Element Collection Test2.90.0611.80.652.30.36
Inheritance Test5.30.0833.70.824.50.45
Indexing Test7.00.114.81.65.90.87
Graph (Binary Tree) Test1.90.241.70.911.80.57
Multithreading Test10.50.103.72.17.11.1
All Tests5.60.113.31.24.40.64

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
 Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Basic Person Test14.2failed16.4failed15.3failed
Element Collection Test4.40.00074.9failed4.60.0007
Inheritance Test10.3failed18.6failed14.4failed
Indexing Test10.0failed16.4failed13.2failed
Graph (Binary Tree) Test2.6failed3.0failed2.8failed
Multithreading Test19.3failed19.3failed19.3failed
All Tests10.10.000713.1failed11.60.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
 Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Basic Person Test49.31.26.8failed28.11.2
Element Collection Test37.60.292.7failed20.10.29
Inheritance Test24.10.697.6failed15.90.69
Indexing Test5.30.000814.8failed10.10.0008
Multithreading Test39.7failed6.1failed22.9failed
All Tests31.20.557.6failed19.40.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
 Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Basic Person Test4.5failed3.2failed3.8failed
Element Collection Test3.90.00163.1failed3.50.0016
Inheritance Test4.6failed4.5failed4.5failed
Indexing Test4.6failed5.5failed5.1failed
Graph (Binary Tree) Test2.7failed1.2failed2.0failed
Multithreading Test11.6failed2.6failed7.1failed
All Tests5.30.00163.3failed4.30.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
 Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Basic Person Test3.8failed4.2failed4.0failed
Element Collection Test2.30.00061.5failed1.90.0006
Inheritance Test4.0failed4.3failed4.2failed
Indexing Test5.5failed3.6failed4.6failed
Graph (Binary Tree) Test0.74failed0.96failed0.85failed
Multithreading Test5.6failed4.9failed5.3failed
All Tests3.70.00063.3failed3.50.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
 Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Basic Person Test52.779.452.779.452.779.4
Element Collection Test42.374.542.374.542.374.5
Inheritance Test49.275.049.275.049.275.0
Indexing Test53.092.953.994.553.493.7
Graph (Binary Tree) Test13.160.69.848.411.554.5
Multithreading Test49.31008.810029.0100
All Tests43.380.436.178.639.779.5

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
 Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Hibernate
Derby embedded
EclipseLink
SQLite embedded
Basic Person Test15.50.666.90.9011.20.74
Element Collection Test10.20.0702.80.656.50.17
Inheritance Test9.70.387.70.828.70.53
Indexing Test6.50.0589.01.67.80.58
Graph (Binary Tree) Test2.00.241.70.911.80.57
Multithreading Test17.30.107.32.112.31.1
All Tests10.50.226.11.28.30.52

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