Compare with

Comparison of EclipseLink with HSQLDB embedded vs Hibernate 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
 EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
Basic Person Test27.10.08317.21.022.20.55
Element Collection Test17.20.0678.20.6912.70.38
Inheritance Test26.70.08011.90.9919.30.54
Indexing Test30.60.09818.61.024.60.55
Graph (Binary Tree) Test20.00.2715.90.9618.00.61
Multithreading Test32.5failed11.4failed22.0failed
All Tests25.70.1213.90.9319.80.53

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
 EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
Basic Person Test24.41.836.01.330.21.5
Element Collection Test14.90.000819.1failed17.00.0008
Inheritance Test22.82.440.01.431.41.9
Indexing Test20.71.938.72.329.72.1
Graph (Binary Tree) Test8.70.5614.20.8811.40.72
Multithreading Test24.2failed28.0failed26.1failed
All Tests19.31.329.31.524.31.4

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
 EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
Basic Person Test2.91.10.880.221.90.65
Element Collection Test3.20.391.4failed2.30.39
Inheritance Test2.60.531.10.281.90.40
Indexing Test21.50.001133.30.4327.40.21
Multithreading Test1.1failed0.52failed0.82failed
All Tests6.30.507.40.316.90.42

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
 EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
Basic Person Test17.90.0767.00.6512.50.37
Element Collection Test14.60.00228.3failed11.40.0022
Inheritance Test16.20.0799.70.9713.00.53
Indexing Test12.00.0576.80.549.40.30
Graph (Binary Tree) Test4.70.263.40.424.00.34
Multithreading Test24.4failed4.4failed14.4failed
All Tests15.00.0946.60.6510.80.34

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
 EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
Basic Person Test32.30.06120.30.9126.30.49
Element Collection Test14.30.00076.0failed10.20.0007
Inheritance Test29.20.05823.90.9026.60.48
Indexing Test55.30.07927.10.5441.20.31
Graph (Binary Tree) Test6.80.2414.10.8010.40.52
Multithreading Test52.9failed28.4failed40.6failed
All Tests31.80.08820.00.7925.90.40

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
 EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
Basic Person Test41.490.241.490.241.490.2
Element Collection Test46.982.046.982.046.982.0
Inheritance Test41.480.541.480.541.480.5
Indexing Test48.493.449.294.848.894.1
Graph (Binary Tree) Test28.567.921.450.925.059.4
Multithreading Test51.9failed10.3failed31.1failed
All Tests43.182.835.179.739.181.2

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
 EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
EclipseLink
HSQLDB embedded
Hibernate
SQLite embedded
Basic Person Test20.90.6316.30.8118.60.72
Element Collection Test12.80.0928.60.6910.70.19
Inheritance Test19.50.6317.30.9118.40.77
Indexing Test28.00.4224.90.9626.50.69
Graph (Binary Tree) Test10.00.3311.90.7711.00.55
Multithreading Test27.0failed14.6failed20.8failed
All Tests20.10.4215.70.8617.90.62

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