Compare with

Comparison of DataNucleus with SQLite embedded vs Hibernate with PostgreSQL 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
 DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
Basic Person Test 8.9 10.6 9.8
Element Collection Test 8.2 7.3 7.8
Inheritance Test 5.5 11.7 8.6
Indexing Test 9.9 13.0 11.5
Graph (Binary Tree) Test 5.9 5.2 5.6
Multithreading Test 10.7 0.0000 5.3
All Tests 8.2 8.0 8.1

Speed comparison of JPA database retrieval operations (normalized score, higher is better)

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
Basic Person Test0.431.9 8.20.435.0
Element Collection Test 0.38 0.36 0.37
Inheritance Test 2.2 7.0 4.6
Indexing Test 1.7 7.9 4.8
Graph (Binary Tree) Test 0.22 0.42 0.32
Multithreading Test 4.0 8.0 6.0
All Tests0.431.7 5.30.433.5

The results above show that in general Hibernate with PostgreSQL server is much more efficient than DataNucleus with SQLite embedded in retrieving JPA entity objects from the database. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.43) to the normalized speed of Hibernate with PostgreSQL database server (3.5) reveals that in these tests, Hibernate with PostgreSQL server is 8.1 times faster than DataNucleus with SQLite embedded.

A large performance gap has been detected when using simple basic entities with small retrieval size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.43) to the normalized speed of Hibernate with PostgreSQL database server (1.9) reveals that in that case, Hibernate with PostgreSQL server is 4.4 times faster than DataNucleus with SQLite embedded.

Speed comparison of JPA database query operations (normalized score, higher is better)

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
Basic Person Testfailed0.57 2.6failed1.6
Element Collection Test 0.85 0.32 0.58
Inheritance Test 0.77 3.3 2.0
Indexing Test 0.65 2.7 1.7
Multithreading Test 4.0 5.3 4.7
All Testsfailed1.4 2.8failed2.1

DataNucleus with SQLite embedded has failed in 1 tests (see exceptions).

Speed comparison of JPA database update operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
Basic Person Test0.0251.8 2.50.0252.1
Element Collection Test 1.5 0.64 1.1
Inheritance Test 1.9 3.2 2.5
Indexing Test 5.7 3.4 4.6
Graph (Binary Tree) Test 0.70 0.51 0.60
Multithreading Test 4.0 2.3 3.2
All Tests0.0252.6 2.10.0252.4

The results above show that in general Hibernate with PostgreSQL server is much more efficient than DataNucleus with SQLite embedded in updating JPA entity objects in the database. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.025) to the normalized speed of Hibernate with PostgreSQL database server (2.4) reveals that in these tests, Hibernate with PostgreSQL server is 96.0 times faster than DataNucleus with SQLite embedded.

A huge performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.025) to the normalized speed of Hibernate with PostgreSQL database server (1.8) reveals that in that case, Hibernate with PostgreSQL server is 72.0 times faster than DataNucleus with SQLite embedded.

Speed comparison of JPA database removal operations (normalized score, higher is better)

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
Basic Person Test0.1715.8 14.70.1715.2
Element Collection Test 6.6 0.74 3.6
Inheritance Test 17.5 13.8 15.7
Indexing Test 20.3 10.3 15.3
Graph (Binary Tree) Test 6.5 7.9 7.2
Multithreading Test 23.0 0.0000 11.5
All Tests0.1714.9 7.90.1711.4

The results above show that in general Hibernate with PostgreSQL server is much more efficient than DataNucleus with SQLite embedded in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.17) to the normalized speed of Hibernate with PostgreSQL database server (11.4) reveals that in these tests, Hibernate with PostgreSQL server is 67.1 times faster than DataNucleus with SQLite embedded.

A huge performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.17) to the normalized speed of Hibernate with PostgreSQL database server (15.8) reveals that in that case, Hibernate with PostgreSQL server is 92.9 times faster than DataNucleus with SQLite embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
Basic Person Test0.215.8 7.70.216.8
Element Collection Test 3.5 1.9 2.7
Inheritance Test 5.6 7.8 6.7
Indexing Test 7.7 7.5 7.6
Graph (Binary Tree) Test 3.3 3.5 3.4
Multithreading Test 9.1 3.1 6.1
All Tests0.215.9 5.30.215.6

The results above show that in general Hibernate with PostgreSQL server is much more efficient than DataNucleus with SQLite embedded in performing JPA database operations. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.21) to the normalized speed of Hibernate with PostgreSQL database server (5.6) reveals that in these tests, Hibernate with PostgreSQL server is 26.7 times faster than DataNucleus with SQLite embedded.

A huge performance gap has been detected when using simple basic entities with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with SQLite embedded database (0.21) to the normalized speed of Hibernate with PostgreSQL database server (5.8) reveals that in that case, Hibernate with PostgreSQL server is 27.6 times faster than DataNucleus with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons