Compare with

Comparison of DataNucleus with H2 server 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 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
Basic Person Test3.40.0832.21.02.80.55
Element Collection Test1.20.0670.640.690.920.38
Inheritance Test3.00.0801.90.992.40.54
Indexing Test5.30.0983.51.04.40.55
Graph (Binary Tree) Test2.10.271.30.961.70.61
Multithreading Test10.0failed4.3failed7.2failed
All Tests4.20.122.30.933.20.53

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
 DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
Basic Person Test2.51.85.21.33.91.5
Element Collection Test0.560.00081.1failed0.820.0008
Inheritance Test2.22.46.11.44.21.9
Indexing Test2.11.97.72.34.92.1
Graph (Binary Tree) Test5.70.568.90.887.30.72
Multithreading Test2.3failed8.7failed5.5failed
All Tests2.51.36.31.54.41.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
 DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
Basic Person Test4.11.11.30.222.70.65
Element Collection Test4.00.390.49failed2.30.39
Inheritance Test2.90.531.50.282.20.40
Indexing Test0.00360.00111.50.430.750.21
Multithreading Test1.3failedfailedfailed1.3failed
All Tests2.50.501.20.311.90.42

DataNucleus with H2 server has failed in 1 tests (see exceptions). 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 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
 DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
Basic Person Test2.50.0761.40.651.90.37
Element Collection Test2.00.00221.0failed1.50.0022
Inheritance Test2.40.0792.30.972.30.53
Indexing Test2.70.0573.00.542.90.30
Graph (Binary Tree) Test1.80.260.600.421.20.34
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests2.30.0941.70.652.00.34

DataNucleus with H2 server 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 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
 DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
Basic Person Test3.40.0611.30.912.30.49
Element Collection Test1.50.00070.68failed1.10.0007
Inheritance Test2.70.0581.30.902.00.48
Indexing Test5.70.0791.90.543.80.31
Graph (Binary Tree) Test1.50.241.20.801.30.52
Multithreading Testfailedfailed5.1failed5.1failed
All Tests3.00.0881.90.792.40.40

DataNucleus with H2 server has failed in 1 tests (see exceptions). 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 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
 DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
DataNucleus
H2 server
Hibernate
SQLite embedded
Basic Person Test3.20.632.30.812.70.72
Element Collection Test1.90.0920.780.691.30.19
Inheritance Test2.60.632.60.912.60.77
Indexing Test3.20.423.50.963.30.69
Graph (Binary Tree) Test2.80.333.00.772.90.55
Multithreading Test4.5failed6.0failed5.3failed
All Tests2.90.422.80.862.90.62

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