Compare with

Comparison of Hibernate 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
 Hibernate
HSQLDB embedded
Hibernate
SQLite embedded
Hibernate
HSQLDB embedded
Hibernate
SQLite embedded
Hibernate
HSQLDB embedded
Hibernate
SQLite embedded
Basic Person Test32.60.08313.11.022.90.55
Element Collection Test15.10.0678.20.6911.70.38
Inheritance Test25.50.08013.60.9919.50.54
Indexing Test29.60.09818.81.024.20.55
Graph (Binary Tree) Test13.80.2715.60.9614.70.61
Multithreading Test37.4failed13.0failed25.2failed
All Tests25.60.1213.70.9319.70.53

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

The results above show that in general Hibernate 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 Hibernate with HSQLDB embedded database (19.7) reveals that in these tests, Hibernate with HSQLDB embedded is 37.2 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.083) to the normalized speed of Hibernate with HSQLDB embedded database (32.6) reveals that in that case, Hibernate with HSQLDB embedded is 393 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
HSQLDB embedded
Hibernate
SQLite embedded
Hibernate
HSQLDB embedded
Hibernate
SQLite embedded
Hibernate
HSQLDB embedded
Hibernate
SQLite embedded
Basic Person Test24.81.816.41.320.61.5
Element Collection Test11.30.000810.8failed11.00.0008
Inheritance Test21.72.421.01.421.31.9
Indexing Test11.91.921.52.316.72.1
Graph (Binary Tree) Test3.60.564.70.884.10.72
Multithreading Test19.8failed21.5failed20.6failed
All Tests15.51.316.01.515.71.4

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

The results above show that in general Hibernate 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 Hibernate with HSQLDB embedded database (15.7) reveals that in these tests, Hibernate with HSQLDB embedded is 11.2 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 Hibernate with HSQLDB embedded database (11.3) reveals that in that case, Hibernate with HSQLDB embedded is 14,125 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
HSQLDB embedded
Hibernate
SQLite embedded
Hibernate
HSQLDB embedded
Hibernate
SQLite embedded
Hibernate
HSQLDB embedded
Hibernate
SQLite embedded
Basic Person Test3.61.10.880.222.20.65
Element Collection Test3.40.391.7failed2.60.39
Inheritance Test2.90.531.00.281.90.40
Indexing Test9.90.001121.70.4315.80.21
Multithreading Test1.1failed0.58failed0.82failed
All Tests4.20.505.20.314.70.42

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

The results above show that in general Hibernate 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 Hibernate with HSQLDB embedded database (4.7) reveals that in these tests, Hibernate with HSQLDB embedded is 11.2 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 Hibernate with HSQLDB embedded database (9.9) reveals that in that case, Hibernate with HSQLDB embedded is 9,000 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
HSQLDB embedded
Hibernate
SQLite embedded
Hibernate
HSQLDB embedded
Hibernate
SQLite embedded
Hibernate
HSQLDB embedded
Hibernate
SQLite embedded
Basic Person Test14.20.0765.00.659.60.37
Element Collection Test10.10.00225.6failed7.80.0022
Inheritance Test13.40.0797.50.9710.50.53
Indexing Test10.70.0576.10.548.40.30
Graph (Binary Tree) Test3.70.262.50.423.10.34
Multithreading Test23.9failed3.8failed13.9failed
All Tests12.70.0945.10.658.90.34

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

The results above show that in general Hibernate 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 Hibernate with HSQLDB embedded database (8.9) reveals that in these tests, Hibernate with HSQLDB embedded is 26.2 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 Hibernate with HSQLDB embedded database (10.1) reveals that in that case, Hibernate with HSQLDB embedded is 4,591 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
HSQLDB embedded
Hibernate
SQLite embedded
Hibernate
HSQLDB embedded
Hibernate
SQLite embedded
Hibernate
HSQLDB embedded
Hibernate
SQLite embedded
Basic Person Test26.10.06117.50.9121.80.49
Element Collection Test9.10.00075.2failed7.10.0007
Inheritance Test21.40.05817.70.9019.60.48
Indexing Test33.00.07916.30.5424.70.31
Graph (Binary Tree) Test5.40.248.20.806.80.52
Multithreading Test38.5failed28.6failed33.5failed
All Tests22.30.08815.60.7918.90.40

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

The results above show that in general Hibernate 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 Hibernate with HSQLDB embedded database (18.9) reveals that in these tests, Hibernate with HSQLDB embedded is 47.2 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 Hibernate with HSQLDB embedded database (9.1) reveals that in that case, Hibernate with HSQLDB embedded is 13,000 times faster than Hibernate with SQLite embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB embedded
Hibernate
SQLite embedded
Hibernate
HSQLDB embedded
Hibernate
SQLite embedded
Hibernate
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 Hibernate with HSQLDB embedded in using disk space. Comparing the normalized score of Hibernate 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 Hibernate with HSQLDB embedded.

A large gap has been detected when using graphs of objects with small transaction size. Comparing the normalized score of Hibernate 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 Hibernate with HSQLDB embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
HSQLDB embedded
Hibernate
SQLite embedded
Hibernate
HSQLDB embedded
Hibernate
SQLite embedded
Hibernate
HSQLDB embedded
Hibernate
SQLite embedded
Basic Person Test20.20.6310.60.8115.40.72
Element Collection Test9.80.0926.30.698.00.19
Inheritance Test17.00.6312.20.9114.60.77
Indexing Test19.00.4216.90.9618.00.69
Graph (Binary Tree) Test6.60.337.80.777.20.55
Multithreading Test24.1failed13.5failed18.8failed
All Tests16.50.4211.30.8613.90.62

The results above show that in general Hibernate 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 Hibernate with HSQLDB embedded database (13.9) reveals that in these tests, Hibernate with HSQLDB embedded is 22.4 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 Hibernate with HSQLDB embedded database (9.8) reveals that in that case, Hibernate with HSQLDB embedded is 107 times faster than Hibernate with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons