Compare with

Comparison of Hibernate with SQLite embedded vs DataNucleus with H2 server

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 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Basic Person Test0.0833.41.02.20.552.8
Element Collection Test0.0671.20.690.640.380.92
Inheritance Test0.0803.00.991.90.542.4
Indexing Test0.0985.31.03.50.554.4
Graph (Binary Tree) Test0.272.10.961.30.611.7
Multithreading Testfailed10.0failed4.3failed7.2
All Tests0.124.20.932.30.533.2

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

The results above show that in general DataNucleus with H2 server 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 database server (3.2) reveals that in these tests, DataNucleus with H2 server is 6.0 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 database server (5.3) reveals that in that case, DataNucleus with H2 server is 54.1 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 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Basic Person Test1.82.51.35.21.53.9
Element Collection Test0.00080.56failed1.10.00080.82
Inheritance Test2.42.21.46.11.94.2
Indexing Test1.92.12.37.72.14.9
Graph (Binary Tree) Test0.565.70.888.90.727.3
Multithreading Testfailed2.3failed8.7failed5.5
All Tests1.32.51.56.31.44.4

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

The results above show that in general DataNucleus with H2 server 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 database server (4.4) reveals that in these tests, DataNucleus with H2 server is 3.1 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 database server (0.56) reveals that in that case, DataNucleus with H2 server is 700 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 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Basic Person Test1.14.10.221.30.652.7
Element Collection Test0.394.0failed0.490.392.3
Inheritance Test0.532.90.281.50.402.2
Indexing Test0.00110.00360.431.50.210.75
Multithreading Testfailed1.3failedfailedfailed1.3
All Tests0.502.50.311.20.421.9

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

The results above show that in general DataNucleus with H2 server 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 database server (1.9) reveals that in these tests, DataNucleus with H2 server is 4.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 database server (4.0) reveals that in that case, DataNucleus with H2 server is 10.3 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 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Basic Person Test0.0762.50.651.40.371.9
Element Collection Test0.00222.0failed1.00.00221.5
Inheritance Test0.0792.40.972.30.532.3
Indexing Test0.0572.70.543.00.302.9
Graph (Binary Tree) Test0.261.80.420.600.341.2
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests0.0942.30.651.70.342.0

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

The results above show that in general DataNucleus with H2 server 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 database server (2.0) reveals that in these tests, DataNucleus with H2 server is 5.9 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 database server (2.0) reveals that in that case, DataNucleus with H2 server is 909 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 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Basic Person Test0.0613.40.911.30.492.3
Element Collection Test0.00071.5failed0.680.00071.1
Inheritance Test0.0582.70.901.30.482.0
Indexing Test0.0795.70.541.90.313.8
Graph (Binary Tree) Test0.241.50.801.20.521.3
Multithreading Testfailedfailedfailed5.1failed5.1
All Tests0.0883.00.791.90.402.4

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

The results above show that in general DataNucleus with H2 server 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 database server (2.4) reveals that in these tests, DataNucleus with H2 server is 6.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 database server (1.5) reveals that in that case, DataNucleus with H2 server is 2,143 times faster than Hibernate with SQLite embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Basic Person Test0.633.20.812.30.722.7
Element Collection Test0.0921.90.690.780.191.3
Inheritance Test0.632.60.912.60.772.6
Indexing Test0.423.20.963.50.693.3
Graph (Binary Tree) Test0.332.80.773.00.552.9
Multithreading Testfailed4.5failed6.0failed5.3
All Tests0.422.90.862.80.622.9

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

Other Head to Head DBMS/JPA Comparisons