Compare with

Comparison of Hibernate with PostgreSQL server vs DataNucleus 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
 Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Basic Person Test7.14.13.42.65.23.3
Element Collection Test2.90.911.70.382.30.64
Inheritance Test7.03.83.62.45.33.1
Indexing Test9.36.06.16.47.76.2
Graph (Binary Tree) Test3.00.912.90.772.90.84
Multithreading Test31.718.013.98.322.813.1
All Tests10.25.65.33.57.74.5

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
 Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Basic Person Test5.51.711.57.68.54.6
Element Collection Test0.0250.730.0170.630.0210.68
Inheritance Test5.21.514.09.39.65.4
Indexing Test4.61.513.39.28.95.3
Graph (Binary Tree) Test0.612.60.7812.30.707.4
Multithreading Test11.33.417.010.814.27.1
All Tests4.51.99.48.37.05.1

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
 Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Basic Person Test55.549.16.14.730.826.9
Element Collection Test11.039.10.0160.485.519.8
Inheritance Test52.355.98.76.630.531.2
Indexing Test0.0500.0488.86.44.43.2
Multithreading Test55.2failed9.2failed32.2failed
All Tests34.836.06.64.520.720.3

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
 Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Basic Person Test5.32.12.70.844.01.5
Element Collection Test0.0671.40.0260.640.0461.0
Inheritance Test5.42.13.81.24.61.7
Indexing Test5.42.24.31.54.81.8
Graph (Binary Tree) Test1.10.650.580.200.820.42
Multithreading Test29.60.466.3failed18.00.46
All Tests7.81.52.90.875.41.2

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
 Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Basic Person Test5.33.04.21.34.82.2
Element Collection Test0.0201.0stopped0.390.00980.69
Inheritance Test5.12.84.21.34.62.1
Indexing Test9.55.46.31.97.93.7
Graph (Binary Tree) Test0.0120.380.0120.370.0120.37
Multithreading Test23.313.821.8failed22.513.8
All Tests7.24.46.11.16.62.9

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
 Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Hibernate
PostgreSQL server
DataNucleus
PostgreSQL server
Basic Person Test15.712.05.63.410.77.7
Element Collection Test2.88.60.350.501.64.6
Inheritance Test15.013.26.94.210.98.7
Indexing Test5.83.07.85.16.84.0
Graph (Binary Tree) Test1.21.11.13.41.12.3
Multithreading Test30.28.913.69.521.99.1
All Tests12.18.06.03.89.16.0

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