Compare with

Comparison of Hibernate with Derby server 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 server
EclipseLink
SQLite embedded
Hibernate
Derby server
EclipseLink
SQLite embedded
Hibernate
Derby server
EclipseLink
SQLite embedded
Basic Person Test3.80.0743.00.903.40.49
Element Collection Test2.00.0611.30.651.70.36
Inheritance Test3.40.0833.00.823.20.45
Indexing Test4.80.114.11.64.40.87
Graph (Binary Tree) Test1.80.241.60.911.70.57
Multithreading Test6.90.103.92.15.41.1
All Tests3.80.112.81.23.30.64

The results above show that in general Hibernate with Derby server 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 database server (3.3) reveals that in these tests, Hibernate with Derby server is 5.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 Hibernate with Derby database server (6.9) reveals that in that case, Hibernate with Derby server is 69.0 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 server
EclipseLink
SQLite embedded
Hibernate
Derby server
EclipseLink
SQLite embedded
Hibernate
Derby server
EclipseLink
SQLite embedded
Basic Person Test3.8failed8.4failed6.1failed
Element Collection Test1.00.00071.0failed1.00.0007
Inheritance Test3.5failed9.7failed6.6failed
Indexing Test3.2failed9.5failed6.4failed
Graph (Binary Tree) Test0.91failed1.2failed1.1failed
Multithreading Test7.8failed13.4failed10.6failed
All Tests3.40.00077.2failed5.30.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 server
EclipseLink
SQLite embedded
Hibernate
Derby server
EclipseLink
SQLite embedded
Hibernate
Derby server
EclipseLink
SQLite embedded
Basic Person Test34.01.24.1failed19.11.2
Element Collection Test33.80.290.64failed17.20.29
Inheritance Test20.50.695.0failed12.80.69
Indexing Test2.00.00089.2failed5.60.0008
Multithreading Test36.2failed5.1failed20.6failed
All Tests25.30.554.8failed15.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
 Hibernate
Derby server
EclipseLink
SQLite embedded
Hibernate
Derby server
EclipseLink
SQLite embedded
Hibernate
Derby server
EclipseLink
SQLite embedded
Basic Person Test2.9failed2.5failed2.7failed
Element Collection Test2.30.00161.5failed1.90.0016
Inheritance Test2.9failed3.5failed3.2failed
Indexing Test3.0failed4.2failed3.6failed
Graph (Binary Tree) Test1.2failed0.58failed0.91failed
Multithreading Test6.8failed2.5failed4.6failed
All Tests3.20.00162.5failed2.80.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 server
EclipseLink
SQLite embedded
Hibernate
Derby server
EclipseLink
SQLite embedded
Hibernate
Derby server
EclipseLink
SQLite embedded
Basic Person Test2.9failed3.5failed3.2failed
Element Collection Test1.70.00060.87failed1.30.0006
Inheritance Test2.9failed3.6failed3.2failed
Indexing Test3.7failed3.6failed3.7failed
Graph (Binary Tree) Test0.69failed0.70failed0.70failed
Multithreading Test6.2failed5.1failed5.6failed
All Tests3.00.00062.9failed3.00.0006

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
Derby server
EclipseLink
SQLite embedded
Hibernate
Derby server
EclipseLink
SQLite embedded
Hibernate
Derby server
EclipseLink
SQLite embedded
Basic Person Test9.50.664.30.906.90.74
Element Collection Test8.20.0701.10.654.60.17
Inheritance Test6.60.385.00.825.80.53
Indexing Test3.30.0586.11.64.70.58
Graph (Binary Tree) Test1.20.241.00.911.10.57
Multithreading Test12.80.106.02.19.41.1
All Tests7.10.224.01.25.60.52

The results above show that in general Hibernate with Derby server 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 database server (5.6) reveals that in these tests, Hibernate with Derby server is 10.8 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 database server (12.8) reveals that in that case, Hibernate with Derby server is 128 times faster than EclipseLink with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons