Compare with

Comparison of DataNucleus with H2 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
 DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
Basic Person Test19.20.0838.01.013.60.55
Element Collection Test6.60.0672.80.694.70.38
Inheritance Test15.60.0804.40.9910.00.54
Indexing Test24.40.09811.81.018.10.55
Graph (Binary Tree) Test9.20.276.20.967.70.61
Multithreading Test34.9failed7.1failed21.0failed
All Tests18.30.126.70.9312.50.53

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
 DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
Basic Person Test13.21.813.51.313.31.5
Element Collection Test6.40.00088.9failed7.70.0008
Inheritance Test12.22.412.71.412.41.9
Indexing Test8.11.916.52.312.32.1
Graph (Binary Tree) Test10.60.5620.90.8815.80.72
Multithreading Test13.3failed9.9failed11.6failed
All Tests10.61.313.71.512.21.4

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
 DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
Basic Person Test4.71.11.40.223.10.65
Element Collection Test5.00.392.4failed3.70.39
Inheritance Test3.80.531.60.282.70.40
Indexing Test0.00410.00111.80.430.910.21
Multithreading Test1.2failed0.79failed1.0failed
All Tests3.00.501.60.312.30.42

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
 DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
Basic Person Test10.00.0763.90.656.90.37
Element Collection Test7.60.00223.9failed5.80.0022
Inheritance Test9.40.0794.40.976.90.53
Indexing Test10.60.0575.90.548.20.30
Graph (Binary Tree) Test5.90.263.70.424.80.34
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests8.70.0944.40.656.50.34

DataNucleus with H2 embedded has failed in 2 tests (see exceptions). 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 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
 DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
Basic Person Test4.20.0611.30.912.80.49
Element Collection Test4.90.00071.6failed3.20.0007
Inheritance Test4.00.0581.30.902.70.48
Indexing Test7.50.0791.90.544.70.31
Graph (Binary Tree) Test5.60.244.10.804.80.52
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests5.20.0882.00.793.60.40

DataNucleus with H2 embedded has failed in 2 tests (see exceptions). 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 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
 DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
Basic Person Test27.090.227.090.227.090.2
Element Collection Test22.482.022.482.022.482.0
Inheritance Test27.080.527.080.527.080.5
Indexing Test31.693.432.194.831.994.1
Graph (Binary Tree) Test20.067.915.050.917.559.4
Multithreading Test33.9failed9.2failed21.5failed
All Tests27.082.822.179.724.681.2

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
 DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
DataNucleus
H2 embedded
Hibernate
SQLite embedded
Basic Person Test10.30.635.60.817.90.72
Element Collection Test6.10.0923.90.695.00.19
Inheritance Test9.00.634.90.916.90.77
Indexing Test10.10.427.60.968.90.69
Graph (Binary Tree) Test7.80.338.70.778.30.55
Multithreading Test16.5failed5.9failed11.2failed
All Tests9.60.426.00.867.80.62

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