Compare with

Comparison of Hibernate with PostgreSQL server vs DataNucleus with MySQL 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
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Basic Person Test7.12.63.41.45.22.0
Element Collection Test2.91.01.70.482.30.76
Inheritance Test7.02.53.61.35.31.9
Indexing Test9.34.06.12.57.73.3
Graph (Binary Tree) Test3.01.12.90.992.91.1
Multithreading Test31.76.213.92.522.84.4
All Tests10.22.95.31.57.72.2

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Basic Person Test5.50.9611.59.38.55.1
Element Collection Test0.0250.180.0170.770.0210.47
Inheritance Test5.20.5514.08.59.64.5
Indexing Test4.60.8213.39.78.95.3
Graph (Binary Tree) Test0.612.10.783.50.702.8
Multithreading Test11.30.2717.07.814.24.0
All Tests4.50.819.46.67.03.7

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

A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of DataNucleus with MySQL database server (0.27) to the normalized speed of Hibernate with PostgreSQL database server (11.3) reveals that in that case, Hibernate with PostgreSQL server is 41.9 times faster than DataNucleus with MySQL 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 MySQL database server (0.77) reveals that in that case, Hibernate with PostgreSQL server is 45.3 times slower than DataNucleus with MySQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Basic Person Test55.57.26.12.230.84.7
Element Collection Test11.05.80.0160.275.53.1
Inheritance Test52.32.98.71.730.52.3
Indexing Test0.0500.00848.82.54.41.2
Multithreading Test55.2failed9.2failed32.2failed
All Tests34.84.06.61.720.72.8

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

The results above show that in general Hibernate with PostgreSQL server is much more efficient than DataNucleus with MySQL server in executing the tested JPA queries. Comparing the normalized speed of DataNucleus with MySQL database server (2.8) to the normalized speed of Hibernate with PostgreSQL database server (20.7) reveals that in these tests, Hibernate with PostgreSQL server is 7.4 times faster than DataNucleus with MySQL server.

A huge performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of DataNucleus with MySQL database server (2.9) to the normalized speed of Hibernate with PostgreSQL database server (52.3) reveals that in that case, Hibernate with PostgreSQL server is 18.0 times faster than DataNucleus with MySQL 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.016) to the normalized speed of DataNucleus with MySQL database server (0.27) reveals that in that case, Hibernate with PostgreSQL server is 16.9 times slower than DataNucleus with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Basic Person Test5.30.612.71.14.00.88
Element Collection Test0.0670.310.0260.440.0460.38
Inheritance Test5.40.513.81.84.61.1
Indexing Test5.40.684.32.24.81.5
Graph (Binary Tree) Test1.10.910.580.470.820.69
Multithreading Test29.60.646.3failed18.00.64
All Tests7.80.612.91.25.40.88

DataNucleus with MySQL 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 MySQL server in updating JPA entity objects in the database. Comparing the normalized speed of DataNucleus with MySQL database server (0.88) to the normalized speed of Hibernate with PostgreSQL database server (5.4) reveals that in these tests, Hibernate with PostgreSQL server is 6.1 times faster than DataNucleus with MySQL server.

A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of DataNucleus with MySQL database server (0.64) to the normalized speed of Hibernate with PostgreSQL database server (29.6) reveals that in that case, Hibernate with PostgreSQL server is 46.2 times faster than DataNucleus with MySQL 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 MySQL database server (0.44) reveals that in that case, Hibernate with PostgreSQL server is 16.9 times slower than DataNucleus with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Basic Person Test5.30.704.21.34.81.0
Element Collection Test0.0200.17stopped0.400.00980.29
Inheritance Test5.10.414.21.34.60.87
Indexing Test9.51.76.31.97.91.8
Graph (Binary Tree) Test0.0120.490.0120.460.0120.47
Multithreading Test23.3failed21.8failed22.5failed
All Tests7.20.696.11.16.60.89

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

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

A huge performance gap has been detected when using class inheritance in the object model with small transaction size. Comparing the normalized speed of DataNucleus with MySQL database server (0.41) to the normalized speed of Hibernate with PostgreSQL database server (5.1) reveals that in that case, Hibernate with PostgreSQL server is 12.4 times faster than DataNucleus with MySQL server.

On the other hand, Hibernate with PostgreSQL server is slower, for instance, when using graphs of objects with small transaction size. Comparing the normalized speed of Hibernate with PostgreSQL database server (0.012) to the normalized speed of DataNucleus with MySQL database server (0.49) reveals that in that case, Hibernate with PostgreSQL server is 40.8 times slower than DataNucleus with MySQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Basic Person Test15.72.45.63.110.72.7
Element Collection Test2.81.50.350.471.60.99
Inheritance Test15.01.46.92.910.92.1
Indexing Test5.81.47.83.86.82.6
Graph (Binary Tree) Test1.21.21.11.41.11.3
Multithreading Test30.22.413.65.121.93.5
All Tests12.11.76.02.69.12.1

The results above show that in general Hibernate with PostgreSQL server is much more efficient than DataNucleus with MySQL server in performing JPA database operations. Comparing the normalized speed of DataNucleus with MySQL database server (2.1) to the normalized speed of Hibernate with PostgreSQL database server (9.1) reveals that in these tests, Hibernate with PostgreSQL server is 4.3 times faster than DataNucleus with MySQL server.

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

Other Head to Head DBMS/JPA Comparisons