Compare with

Comparison of DataNucleus with MySQL 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
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
Basic Person Test2.67.11.43.42.05.2
Element Collection Test1.02.90.481.70.762.3
Inheritance Test2.57.01.33.61.95.3
Indexing Test4.09.32.56.13.37.7
Graph (Binary Tree) Test1.13.00.992.91.12.9
Multithreading Test6.231.72.513.94.422.8
All Tests2.910.21.55.32.27.7

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
 DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
Basic Person Test0.965.59.311.55.18.5
Element Collection Test0.180.0250.770.0170.470.021
Inheritance Test0.555.28.514.04.59.6
Indexing Test0.824.69.713.35.38.9
Graph (Binary Tree) Test2.10.613.50.782.80.70
Multithreading Test0.2711.37.817.04.014.2
All Tests0.814.56.69.43.77.0

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
 DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
Basic Person Test7.255.52.26.14.730.8
Element Collection Test5.811.00.270.0163.15.5
Inheritance Test2.952.31.78.72.330.5
Indexing Test0.00840.0502.58.81.24.4
Multithreading Testfailed55.2failed9.2failed32.2
All Tests4.034.81.76.62.820.7

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
 DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
Basic Person Test0.615.31.12.70.884.0
Element Collection Test0.310.0670.440.0260.380.046
Inheritance Test0.515.41.83.81.14.6
Indexing Test0.685.42.24.31.54.8
Graph (Binary Tree) Test0.911.10.470.580.690.82
Multithreading Test0.6429.6failed6.30.6418.0
All Tests0.617.81.22.90.885.4

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
 DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
Basic Person Test0.705.31.34.21.04.8
Element Collection Test0.170.0200.40stopped0.290.0098
Inheritance Test0.415.11.34.20.874.6
Indexing Test1.79.51.96.31.87.9
Graph (Binary Tree) Test0.490.0120.460.0120.470.012
Multithreading Testfailed23.3failed21.8failed22.5
All Tests0.697.21.16.10.896.6

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
 DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
DataNucleus
MySQL server
Hibernate
PostgreSQL server
Basic Person Test2.415.73.15.62.710.7
Element Collection Test1.52.80.470.350.991.6
Inheritance Test1.415.02.96.92.110.9
Indexing Test1.45.83.87.82.66.8
Graph (Binary Tree) Test1.21.21.41.11.31.1
Multithreading Test2.430.25.113.63.521.9
All Tests1.712.12.66.02.19.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