Compare with

Comparison of DataNucleus with PostgreSQL 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
PostgreSQL server
Hibernate
SQLite embedded
DataNucleus
PostgreSQL server
Hibernate
SQLite embedded
DataNucleus
PostgreSQL server
Hibernate
SQLite embedded
Basic Person Test4.10.0832.61.03.30.55
Element Collection Test0.910.0670.380.690.640.38
Inheritance Test3.80.0802.40.993.10.54
Indexing Test6.00.0986.41.06.20.55
Graph (Binary Tree) Test0.910.270.770.960.840.61
Multithreading Test18.0failed8.3failed13.1failed
All Tests5.60.123.50.934.50.53

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

The results above show that in general DataNucleus with PostgreSQL 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 PostgreSQL database server (4.5) reveals that in these tests, DataNucleus with PostgreSQL server is 8.5 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 PostgreSQL database server (6.0) reveals that in that case, DataNucleus with PostgreSQL server is 61.2 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
PostgreSQL server
Hibernate
SQLite embedded
DataNucleus
PostgreSQL server
Hibernate
SQLite embedded
DataNucleus
PostgreSQL server
Hibernate
SQLite embedded
Basic Person Test1.71.87.61.34.61.5
Element Collection Test0.730.00080.63failed0.680.0008
Inheritance Test1.52.49.31.45.41.9
Indexing Test1.51.99.22.35.32.1
Graph (Binary Tree) Test2.60.5612.30.887.40.72
Multithreading Test3.4failed10.8failed7.1failed
All Tests1.91.38.31.55.11.4

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

The results above show that in general DataNucleus with PostgreSQL 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 PostgreSQL database server (5.1) reveals that in these tests, DataNucleus with PostgreSQL server is 3.6 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 PostgreSQL database server (0.73) reveals that in that case, DataNucleus with PostgreSQL server is 912 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
PostgreSQL server
Hibernate
SQLite embedded
DataNucleus
PostgreSQL server
Hibernate
SQLite embedded
DataNucleus
PostgreSQL server
Hibernate
SQLite embedded
Basic Person Test49.11.14.70.2226.90.65
Element Collection Test39.10.390.48failed19.80.39
Inheritance Test55.90.536.60.2831.20.40
Indexing Test0.0480.00116.40.433.20.21
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests36.00.504.50.3120.30.42

DataNucleus with PostgreSQL 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 PostgreSQL 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 PostgreSQL database server (20.3) reveals that in these tests, DataNucleus with PostgreSQL server is 48.3 times faster than Hibernate with SQLite embedded.

A huge performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of Hibernate with SQLite embedded database (0.53) to the normalized speed of DataNucleus with PostgreSQL database server (55.9) reveals that in that case, DataNucleus with PostgreSQL server is 105 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
PostgreSQL server
Hibernate
SQLite embedded
DataNucleus
PostgreSQL server
Hibernate
SQLite embedded
DataNucleus
PostgreSQL server
Hibernate
SQLite embedded
Basic Person Test2.10.0760.840.651.50.37
Element Collection Test1.40.00220.64failed1.00.0022
Inheritance Test2.10.0791.20.971.70.53
Indexing Test2.20.0571.50.541.80.30
Graph (Binary Tree) Test0.650.260.200.420.420.34
Multithreading Test0.46failedfailedfailed0.46failed
All Tests1.50.0940.870.651.20.34

DataNucleus with PostgreSQL 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 PostgreSQL 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 PostgreSQL database server (1.2) reveals that in these tests, DataNucleus with PostgreSQL server is 3.5 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 PostgreSQL database server (1.4) reveals that in that case, DataNucleus with PostgreSQL server is 636 times faster than Hibernate with SQLite embedded.

On the other hand, DataNucleus with PostgreSQL server is slower, for instance, when using graphs of objects with large transaction size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (0.20) to the normalized speed of Hibernate with SQLite embedded database (0.42) reveals that in that case, DataNucleus with PostgreSQL server is 2.1 times slower than Hibernate with SQLite embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
PostgreSQL server
Hibernate
SQLite embedded
DataNucleus
PostgreSQL server
Hibernate
SQLite embedded
DataNucleus
PostgreSQL server
Hibernate
SQLite embedded
Basic Person Test3.00.0611.30.912.20.49
Element Collection Test1.00.00070.39failed0.690.0007
Inheritance Test2.80.0581.30.902.10.48
Indexing Test5.40.0791.90.543.70.31
Graph (Binary Tree) Test0.380.240.370.800.370.52
Multithreading Test13.8failedfailedfailed13.8failed
All Tests4.40.0881.10.792.90.40

DataNucleus with PostgreSQL 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 PostgreSQL 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 PostgreSQL database server (2.9) reveals that in these tests, DataNucleus with PostgreSQL server is 7.2 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 PostgreSQL database server (1.0) reveals that in that case, DataNucleus with PostgreSQL server is 1,429 times faster than Hibernate with SQLite embedded.

On the other hand, DataNucleus with PostgreSQL server is slower, for instance, when using graphs of objects with large transaction size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (0.37) to the normalized speed of Hibernate with SQLite embedded database (0.80) reveals that in that case, DataNucleus with PostgreSQL server is 2.2 times slower than Hibernate with SQLite embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
PostgreSQL server
Hibernate
SQLite embedded
DataNucleus
PostgreSQL server
Hibernate
SQLite embedded
DataNucleus
PostgreSQL server
Hibernate
SQLite embedded
Basic Person Test12.00.633.40.817.70.72
Element Collection Test8.60.0920.500.694.60.19
Inheritance Test13.20.634.20.918.70.77
Indexing Test3.00.425.10.964.00.69
Graph (Binary Tree) Test1.10.333.40.772.30.55
Multithreading Test8.9failed9.5failed9.1failed
All Tests8.00.423.80.866.00.62

The results above show that in general DataNucleus with PostgreSQL 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 PostgreSQL database server (6.0) reveals that in these tests, DataNucleus with PostgreSQL server is 9.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 PostgreSQL database server (8.6) reveals that in that case, DataNucleus with PostgreSQL server is 93.5 times faster than Hibernate with SQLite embedded.

Other Head to Head DBMS/JPA Comparisons