Compare with

Comparison of Hibernate with PostgreSQL server vs DataNucleus 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
 Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Basic Person Test8.9 10.6 9.8 
Element Collection Test8.2 7.3 7.8 
Inheritance Test5.5 11.7 8.6 
Indexing Test9.9 13.0 11.5 
Graph (Binary Tree) Test5.9 5.2 5.6 
Multithreading Test10.7 0.0000 5.3 
All Tests8.2 8.0 8.1 

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Basic Person Test1.90.438.2 5.00.43
Element Collection Test0.38 0.36 0.37 
Inheritance Test2.2 7.0 4.6 
Indexing Test1.7 7.9 4.8 
Graph (Binary Tree) Test0.22 0.42 0.32 
Multithreading Test4.0 8.0 6.0 
All Tests1.70.435.3 3.50.43

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
 Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Basic Person Test0.57failed2.6 1.6failed
Element Collection Test0.85 0.32 0.58 
Inheritance Test0.77 3.3 2.0 
Indexing Test0.65 2.7 1.7 
Multithreading Test4.0 5.3 4.7 
All Tests1.4failed2.8 2.1failed

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
 Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Basic Person Test1.80.0252.5 2.10.025
Element Collection Test1.5 0.64 1.1 
Inheritance Test1.9 3.2 2.5 
Indexing Test5.7 3.4 4.6 
Graph (Binary Tree) Test0.70 0.51 0.60 
Multithreading Test4.0 2.3 3.2 
All Tests2.60.0252.1 2.40.025

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
 Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Basic Person Test15.80.1714.7 15.20.17
Element Collection Test6.6 0.74 3.6 
Inheritance Test17.5 13.8 15.7 
Indexing Test20.3 10.3 15.3 
Graph (Binary Tree) Test6.5 7.9 7.2 
Multithreading Test23.0 0.0000 11.5 
All Tests14.90.177.9 11.40.17

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
 Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Hibernate
PostgreSQL server
DataNucleus
SQLite embedded
Basic Person Test5.80.217.7 6.80.21
Element Collection Test3.5 1.9 2.7 
Inheritance Test5.6 7.8 6.7 
Indexing Test7.7 7.5 7.6 
Graph (Binary Tree) Test3.3 3.5 3.4 
Multithreading Test9.1 3.1 6.1 
All Tests5.90.215.3 5.60.21

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