Compare with

Comparison of Hibernate with Derby 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
Derby server
DataNucleus
PostgreSQL server
Hibernate
Derby server
DataNucleus
PostgreSQL server
Hibernate
Derby server
DataNucleus
PostgreSQL server
Basic Person Test3.84.13.02.63.43.3
Element Collection Test2.00.911.30.381.70.64
Inheritance Test3.43.83.02.43.23.1
Indexing Test4.86.04.16.44.46.2
Graph (Binary Tree) Test1.80.911.60.771.70.84
Multithreading Test6.918.03.98.35.413.1
All Tests3.85.62.83.53.34.5

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

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

On the other hand, DataNucleus with PostgreSQL server is slower, for instance, 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 Derby database server (1.3) reveals that in that case, DataNucleus with PostgreSQL server is 3.4 times slower than Hibernate with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby server
DataNucleus
PostgreSQL server
Hibernate
Derby server
DataNucleus
PostgreSQL server
Hibernate
Derby server
DataNucleus
PostgreSQL server
Basic Person Test3.81.78.47.66.14.6
Element Collection Test1.00.731.00.631.00.68
Inheritance Test3.51.59.79.36.65.4
Indexing Test3.21.59.59.26.45.3
Graph (Binary Tree) Test0.912.61.212.31.17.4
Multithreading Test7.83.413.410.810.67.1
All Tests3.41.97.28.35.35.1

The results above show that in general Hibernate with Derby server is slightly 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 Derby database server (3.5) reveals that in that case, Hibernate with Derby server is 2.3 times faster than DataNucleus with PostgreSQL server.

On the other hand, Hibernate with Derby server is slower, for instance, when using graphs of objects with large retrieval size. Comparing the normalized speed of Hibernate with Derby database server (1.2) to the normalized speed of DataNucleus with PostgreSQL database server (12.3) reveals that in that case, Hibernate with Derby server is 10.3 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
Derby server
DataNucleus
PostgreSQL server
Hibernate
Derby server
DataNucleus
PostgreSQL server
Hibernate
Derby server
DataNucleus
PostgreSQL server
Basic Person Test34.049.14.14.719.126.9
Element Collection Test33.839.10.640.4817.219.8
Inheritance Test20.555.95.06.612.831.2
Indexing Test2.00.0489.26.45.63.2
Multithreading Test36.2failed5.1failed20.6failed
All Tests25.336.04.84.515.120.3

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

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

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

On the other hand, DataNucleus with PostgreSQL server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (0.048) to the normalized speed of Hibernate with Derby database server (2.0) reveals that in that case, DataNucleus with PostgreSQL server is 41.7 times slower than Hibernate with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby server
DataNucleus
PostgreSQL server
Hibernate
Derby server
DataNucleus
PostgreSQL server
Hibernate
Derby server
DataNucleus
PostgreSQL server
Basic Person Test2.92.12.50.842.71.5
Element Collection Test2.31.41.50.641.91.0
Inheritance Test2.92.13.51.23.21.7
Indexing Test3.02.24.21.53.61.8
Graph (Binary Tree) Test1.20.650.580.200.910.42
Multithreading Test6.80.462.5failed4.60.46
All Tests3.21.52.50.872.81.2

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

The results above show that in general Hibernate with Derby server is 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 Derby database server (2.8) reveals that in these tests, Hibernate with Derby server is 2.3 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 Derby database server (6.8) reveals that in that case, Hibernate with Derby server is 14.8 times faster than DataNucleus with PostgreSQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
Derby server
DataNucleus
PostgreSQL server
Hibernate
Derby server
DataNucleus
PostgreSQL server
Hibernate
Derby server
DataNucleus
PostgreSQL server
Basic Person Test2.93.03.51.33.22.2
Element Collection Test1.71.00.870.391.30.69
Inheritance Test2.92.83.61.33.22.1
Indexing Test3.75.43.61.93.73.7
Graph (Binary Tree) Test0.690.380.700.370.700.37
Multithreading Test6.213.85.1failed5.613.8
All Tests3.04.42.91.13.02.9

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

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

A large performance gap has been detected when using class inheritance in the object model with large transaction size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (1.3) to the normalized speed of Hibernate with Derby database server (3.6) reveals that in that case, Hibernate with Derby server is 2.8 times faster than DataNucleus with PostgreSQL server.

On the other hand, Hibernate with Derby server is slower, for instance, when using multithreading with small transaction size. Comparing the normalized speed of Hibernate with Derby database server (6.2) to the normalized speed of DataNucleus with PostgreSQL database server (13.8) reveals that in that case, Hibernate with Derby server is 2.2 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
Derby server
DataNucleus
PostgreSQL server
Hibernate
Derby server
DataNucleus
PostgreSQL server
Hibernate
Derby server
DataNucleus
PostgreSQL server
Basic Person Test9.512.04.33.46.97.7
Element Collection Test8.28.61.10.504.64.6
Inheritance Test6.613.25.04.25.88.7
Indexing Test3.33.06.15.14.74.0
Graph (Binary Tree) Test1.21.11.03.41.12.3
Multithreading Test12.88.96.09.59.49.1
All Tests7.18.04.03.85.66.0

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

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

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

Other Head to Head DBMS/JPA Comparisons