Compare with

Comparison of DataNucleus with PostgreSQL server 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
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
Basic Person Test4.17.12.63.43.35.2
Element Collection Test0.912.90.381.70.642.3
Inheritance Test3.87.02.43.63.15.3
Indexing Test6.09.36.46.16.27.7
Graph (Binary Tree) Test0.913.00.772.90.842.9
Multithreading Test18.031.78.313.913.122.8
All Tests5.610.23.55.34.57.7

The results above show that in general Hibernate with PostgreSQL server is more efficient than DataNucleus with PostgreSQL server in persisting JPA entity objects to the database.

A large performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (0.38) to the normalized speed of Hibernate with PostgreSQL database server (1.7) reveals that in that case, Hibernate with PostgreSQL server is 4.5 times faster than DataNucleus with PostgreSQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
Basic Person Test1.75.57.611.54.68.5
Element Collection Test0.730.0250.630.0170.680.021
Inheritance Test1.55.29.314.05.49.6
Indexing Test1.54.69.213.35.38.9
Graph (Binary Tree) Test2.60.6112.30.787.40.70
Multithreading Test3.411.310.817.07.114.2
All Tests1.94.58.39.45.17.0

The results above show that in general Hibernate with PostgreSQL server is more efficient than DataNucleus with PostgreSQL server in retrieving JPA entity objects from the database.

A large performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (1.5) to the normalized speed of Hibernate with PostgreSQL database server (5.2) reveals that in that case, Hibernate with PostgreSQL server is 3.5 times faster than DataNucleus with PostgreSQL server.

On the other hand, Hibernate with PostgreSQL server is slower, for instance, when using JPA element collections with large retrieval size. Comparing the normalized speed of Hibernate with PostgreSQL database server (0.017) to the normalized speed of DataNucleus with PostgreSQL database server (0.63) reveals that in that case, Hibernate with PostgreSQL server is 37.1 times slower than DataNucleus with PostgreSQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
Basic Person Test49.155.54.76.126.930.8
Element Collection Test39.111.00.480.01619.85.5
Inheritance Test55.952.36.68.731.230.5
Indexing Test0.0480.0506.48.83.24.4
Multithreading Testfailed55.2failed9.2failed32.2
All Tests36.034.84.56.620.320.7

DataNucleus with PostgreSQL server has failed in 2 tests (see exceptions).

The results above show that in general Hibernate with PostgreSQL server is slightly more efficient than DataNucleus with PostgreSQL server in executing the tested JPA queries.

On the other hand, Hibernate with PostgreSQL server is slower, for instance, when using JPA element collections with large retrieval size. Comparing the normalized speed of Hibernate with PostgreSQL database server (0.016) to the normalized speed of DataNucleus with PostgreSQL database server (0.48) reveals that in that case, Hibernate with PostgreSQL server is 30.0 times slower than DataNucleus with PostgreSQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
Basic Person Test2.15.30.842.71.54.0
Element Collection Test1.40.0670.640.0261.00.046
Inheritance Test2.15.41.23.81.74.6
Indexing Test2.25.41.54.31.84.8
Graph (Binary Tree) Test0.651.10.200.580.420.82
Multithreading Test0.4629.6failed6.30.4618.0
All Tests1.57.80.872.91.25.4

DataNucleus with PostgreSQL server has failed in 1 tests (see exceptions).

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

A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (0.46) to the normalized speed of Hibernate with PostgreSQL database server (29.6) reveals that in that case, Hibernate with PostgreSQL server is 64.3 times faster than DataNucleus with PostgreSQL server.

On the other hand, Hibernate with PostgreSQL server is slower, for instance, when using JPA element collections with large transaction size. Comparing the normalized speed of Hibernate with PostgreSQL database server (0.026) to the normalized speed of DataNucleus with PostgreSQL database server (0.64) reveals that in that case, Hibernate with PostgreSQL server is 24.6 times slower than DataNucleus with PostgreSQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
Basic Person Test3.05.31.34.22.24.8
Element Collection Test1.00.0200.39stopped0.690.0098
Inheritance Test2.85.11.34.22.14.6
Indexing Test5.49.51.96.33.77.9
Graph (Binary Tree) Test0.380.0120.370.0120.370.012
Multithreading Test13.823.3failed21.813.822.5
All Tests4.47.21.16.12.96.6

DataNucleus with PostgreSQL server has failed in 1 tests (see exceptions).

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

A large performance gap has been detected when using database indexes with large transaction size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (1.9) to the normalized speed of Hibernate with PostgreSQL database server (6.3) reveals that in that case, Hibernate with PostgreSQL server is 3.3 times faster than DataNucleus with PostgreSQL server.

On the other hand, Hibernate with PostgreSQL server is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of Hibernate with PostgreSQL database server (0.020) to the normalized speed of DataNucleus with PostgreSQL database server (1.0) reveals that in that case, Hibernate with PostgreSQL server is 50.0 times slower than DataNucleus with PostgreSQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
Basic Person Test12.015.73.45.67.710.7
Element Collection Test8.62.80.500.354.61.6
Inheritance Test13.215.04.26.98.710.9
Indexing Test3.05.85.17.84.06.8
Graph (Binary Tree) Test1.11.23.41.12.31.1
Multithreading Test8.930.29.513.69.121.9
All Tests8.012.13.86.06.09.1

The results above show that in general Hibernate with PostgreSQL server is more efficient than DataNucleus with PostgreSQL server in performing JPA database operations.

A large performance gap has been detected when using multithreading with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (8.9) to the normalized speed of Hibernate with PostgreSQL database server (30.2) reveals that in that case, Hibernate with PostgreSQL server is 3.4 times faster than DataNucleus with PostgreSQL server.

On the other hand, Hibernate with PostgreSQL server is slower, for instance, when using graphs of objects with large transaction/retrieval size. Comparing the normalized speed of Hibernate with PostgreSQL database server (1.1) to the normalized speed of DataNucleus with PostgreSQL database server (3.4) reveals that in that case, Hibernate with PostgreSQL server is 3.1 times slower than DataNucleus with PostgreSQL server.

Other Head to Head DBMS/JPA Comparisons