Compare with

Comparison of Hibernate with SQLite embedded vs DataNucleus with H2 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
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Basic Person Test0.08319.21.08.00.5513.6
Element Collection Test0.0676.60.692.80.384.7
Inheritance Test0.08015.60.994.40.5410.0
Indexing Test0.09824.41.011.80.5518.1
Graph (Binary Tree) Test0.279.20.966.20.617.7
Multithreading Testfailed34.9failed7.1failed21.0
All Tests0.1218.30.936.70.5312.5

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

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

A huge performance gap has been detected when using database indexes with small transaction size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.098) to the normalized speed of DataNucleus with H2 embedded database (24.4) reveals that in that case, DataNucleus with H2 embedded is 249 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
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Basic Person Test1.813.21.313.51.513.3
Element Collection Test0.00086.4failed8.90.00087.7
Inheritance Test2.412.21.412.71.912.4
Indexing Test1.98.12.316.52.112.3
Graph (Binary Tree) Test0.5610.60.8820.90.7215.8
Multithreading Testfailed13.3failed9.9failed11.6
All Tests1.310.61.513.71.412.2

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

The results above show that in general DataNucleus with H2 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 DataNucleus with H2 embedded database (12.2) reveals that in these tests, DataNucleus with H2 embedded is 8.7 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 DataNucleus with H2 embedded database (6.4) reveals that in that case, DataNucleus with H2 embedded is 8,000 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
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Basic Person Test1.14.70.221.40.653.1
Element Collection Test0.395.0failed2.40.393.7
Inheritance Test0.533.80.281.60.402.7
Indexing Test0.00110.00410.431.80.210.91
Multithreading Testfailed1.2failed0.79failed1.0
All Tests0.503.00.311.60.422.3

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

The results above show that in general DataNucleus with H2 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 DataNucleus with H2 embedded database (2.3) reveals that in these tests, DataNucleus with H2 embedded is 5.5 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.39) to the normalized speed of DataNucleus with H2 embedded database (5.0) reveals that in that case, DataNucleus with H2 embedded is 12.8 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
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Basic Person Test0.07610.00.653.90.376.9
Element Collection Test0.00227.6failed3.90.00225.8
Inheritance Test0.0799.40.974.40.536.9
Indexing Test0.05710.60.545.90.308.2
Graph (Binary Tree) Test0.265.90.423.70.344.8
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.0948.70.654.40.346.5

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

The results above show that in general DataNucleus with H2 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 DataNucleus with H2 embedded database (6.5) reveals that in these tests, DataNucleus with H2 embedded is 19.1 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 DataNucleus with H2 embedded database (7.6) reveals that in that case, DataNucleus with H2 embedded is 3,455 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
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Basic Person Test0.0614.20.911.30.492.8
Element Collection Test0.00074.9failed1.60.00073.2
Inheritance Test0.0584.00.901.30.482.7
Indexing Test0.0797.50.541.90.314.7
Graph (Binary Tree) Test0.245.60.804.10.524.8
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.0885.20.792.00.403.6

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

The results above show that in general DataNucleus with H2 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 DataNucleus with H2 embedded database (3.6) reveals that in these tests, DataNucleus with H2 embedded is 9.0 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 DataNucleus with H2 embedded database (4.9) reveals that in that case, DataNucleus with H2 embedded is 7,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
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Basic Person Test90.227.090.227.090.227.0
Element Collection Test82.022.482.022.482.022.4
Inheritance Test80.527.080.527.080.527.0
Indexing Test93.431.694.832.194.131.9
Graph (Binary Tree) Test67.920.050.915.059.417.5
Multithreading Testfailed33.9failed9.2failed21.5
All Tests82.827.079.722.181.224.6

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

The results above show that in general Hibernate with SQLite embedded is much more efficient than DataNucleus with H2 embedded in using disk space. Comparing the normalized score of DataNucleus with H2 embedded database (24.6) to the normalized score of Hibernate with SQLite embedded database (81.2) reveals that in these tests, Hibernate with SQLite embedded is 3.3 times more efficient than DataNucleus with H2 embedded.

A large gap has been detected when using JPA element collections with small transaction size. Comparing the normalized score of DataNucleus with H2 embedded database (22.4) to the normalized score of Hibernate with SQLite embedded database (82.0) reveals that in that case, Hibernate with SQLite embedded is 3.7 times more efficient than DataNucleus with H2 embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Basic Person Test0.6310.30.815.60.727.9
Element Collection Test0.0926.10.693.90.195.0
Inheritance Test0.639.00.914.90.776.9
Indexing Test0.4210.10.967.60.698.9
Graph (Binary Tree) Test0.337.80.778.70.558.3
Multithreading Testfailed16.5failed5.9failed11.2
All Tests0.429.60.866.00.627.8

The results above show that in general DataNucleus with H2 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 DataNucleus with H2 embedded database (7.8) reveals that in these tests, DataNucleus with H2 embedded is 12.6 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 DataNucleus with H2 embedded database (6.1) reveals that in that case, DataNucleus with H2 embedded is 66.3 times faster than Hibernate with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons