Compare with

Comparison of Hibernate with SQLite embedded vs EclipseLink 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
 Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Basic Person Test0.08327.11.017.20.5522.2
Element Collection Test0.06717.20.698.20.3812.7
Inheritance Test0.08026.70.9911.90.5419.3
Indexing Test0.09830.61.018.60.5524.6
Graph (Binary Tree) Test0.2720.00.9615.90.6118.0
Multithreading Testfailed32.5failed11.4failed22.0
All Tests0.1225.70.9313.90.5319.8

Hibernate with SQLite embedded has failed in 2 tests (see exceptions).

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than Hibernate with SQLite embedded in persisting JPA entity objects to the database. Comparing the normalized speed of Hibernate with SQLite embedded database (0.53) to the normalized speed of EclipseLink with HSQLDB embedded database (19.8) reveals that in these tests, EclipseLink with HSQLDB embedded is 37.4 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using class inheritance in the object model with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.080) to the normalized speed of EclipseLink with HSQLDB embedded database (26.7) reveals that in that case, EclipseLink with HSQLDB embedded is 334 times faster than Hibernate with SQLite embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Basic Person Test1.824.41.336.01.530.2
Element Collection Test0.000814.9failed19.10.000817.0
Inheritance Test2.422.81.440.01.931.4
Indexing Test1.920.72.338.72.129.7
Graph (Binary Tree) Test0.568.70.8814.20.7211.4
Multithreading Testfailed24.2failed28.0failed26.1
All Tests1.319.31.529.31.424.3

Hibernate with SQLite embedded has failed in 3 tests (see exceptions).

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than Hibernate with SQLite embedded in retrieving JPA entity objects from the database. Comparing the normalized speed of Hibernate with SQLite embedded database (1.4) to the normalized speed of EclipseLink with HSQLDB embedded database (24.3) reveals that in these tests, EclipseLink with HSQLDB embedded is 17.4 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.0008) to the normalized speed of EclipseLink with HSQLDB embedded database (14.9) reveals that in that case, EclipseLink with HSQLDB embedded is 18,625 times faster than Hibernate with SQLite embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Basic Person Test1.12.90.220.880.651.9
Element Collection Test0.393.2failed1.40.392.3
Inheritance Test0.532.60.281.10.401.9
Indexing Test0.001121.50.4333.30.2127.4
Multithreading Testfailed1.1failed0.52failed0.82
All Tests0.506.30.317.40.426.9

Hibernate with SQLite embedded has failed in 3 tests (see exceptions).

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than Hibernate with SQLite embedded in executing the tested JPA queries. Comparing the normalized speed of Hibernate with SQLite embedded database (0.42) to the normalized speed of EclipseLink with HSQLDB embedded database (6.9) reveals that in these tests, EclipseLink with HSQLDB embedded is 16.4 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using database indexes with small retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.0011) to the normalized speed of EclipseLink with HSQLDB embedded database (21.5) reveals that in that case, EclipseLink with HSQLDB embedded is 19,545 times faster than Hibernate with SQLite embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Basic Person Test0.07617.90.657.00.3712.5
Element Collection Test0.002214.6failed8.30.002211.4
Inheritance Test0.07916.20.979.70.5313.0
Indexing Test0.05712.00.546.80.309.4
Graph (Binary Tree) Test0.264.70.423.40.344.0
Multithreading Testfailed24.4failed4.4failed14.4
All Tests0.09415.00.656.60.3410.8

Hibernate with SQLite embedded has failed in 3 tests (see exceptions).

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than Hibernate with SQLite embedded in updating JPA entity objects in the database. Comparing the normalized speed of Hibernate with SQLite embedded database (0.34) to the normalized speed of EclipseLink with HSQLDB embedded database (10.8) reveals that in these tests, EclipseLink with HSQLDB embedded is 31.8 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.0022) to the normalized speed of EclipseLink with HSQLDB embedded database (14.6) reveals that in that case, EclipseLink with HSQLDB embedded is 6,636 times faster than Hibernate with SQLite embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Basic Person Test0.06132.30.9120.30.4926.3
Element Collection Test0.000714.3failed6.00.000710.2
Inheritance Test0.05829.20.9023.90.4826.6
Indexing Test0.07955.30.5427.10.3141.2
Graph (Binary Tree) Test0.246.80.8014.10.5210.4
Multithreading Testfailed52.9failed28.4failed40.6
All Tests0.08831.80.7920.00.4025.9

Hibernate with SQLite embedded has failed in 3 tests (see exceptions).

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than Hibernate with SQLite embedded in deleting JPA entity objects from the database. Comparing the normalized speed of Hibernate with SQLite embedded database (0.40) to the normalized speed of EclipseLink with HSQLDB embedded database (25.9) reveals that in these tests, EclipseLink with HSQLDB embedded is 64.7 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.0007) to the normalized speed of EclipseLink with HSQLDB embedded database (14.3) reveals that in that case, EclipseLink with HSQLDB embedded is 20,429 times faster than Hibernate with SQLite embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Basic Person Test90.241.490.241.490.241.4
Element Collection Test82.046.982.046.982.046.9
Inheritance Test80.541.480.541.480.541.4
Indexing Test93.448.494.849.294.148.8
Graph (Binary Tree) Test67.928.550.921.459.425.0
Multithreading Testfailed51.9failed10.3failed31.1
All Tests82.843.179.735.181.239.1

Hibernate with SQLite embedded has failed in 2 tests (see exceptions).

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

A large gap has been detected when using graphs of objects with small transaction size. Comparing the normalized score of EclipseLink with HSQLDB embedded database (28.5) to the normalized score of Hibernate with SQLite embedded database (67.9) reveals that in that case, Hibernate with SQLite embedded is 2.4 times more efficient than EclipseLink with HSQLDB embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Basic Person Test0.6320.90.8116.30.7218.6
Element Collection Test0.09212.80.698.60.1910.7
Inheritance Test0.6319.50.9117.30.7718.4
Indexing Test0.4228.00.9624.90.6926.5
Graph (Binary Tree) Test0.3310.00.7711.90.5511.0
Multithreading Testfailed27.0failed14.6failed20.8
All Tests0.4220.10.8615.70.6217.9

The results above show that in general EclipseLink with HSQLDB embedded is much more efficient than Hibernate with SQLite embedded in performing JPA database operations. Comparing the normalized speed of Hibernate with SQLite embedded database (0.62) to the normalized speed of EclipseLink with HSQLDB embedded database (17.9) reveals that in these tests, EclipseLink with HSQLDB embedded is 28.9 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.092) to the normalized speed of EclipseLink with HSQLDB embedded database (12.8) reveals that in that case, EclipseLink with HSQLDB embedded is 139 times faster than Hibernate with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons