Compare with

Comparison of DataNucleus with MySQL 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
 DataNucleus
MySQL server
DataNucleus
PostgreSQL server
DataNucleus
MySQL server
DataNucleus
PostgreSQL server
DataNucleus
MySQL server
DataNucleus
PostgreSQL server
Basic Person Test2.64.11.42.62.03.3
Element Collection Test1.00.910.480.380.760.64
Inheritance Test2.53.81.32.41.93.1
Indexing Test4.06.02.56.43.36.2
Graph (Binary Tree) Test1.10.910.990.771.10.84
Multithreading Test6.218.02.58.34.413.1
All Tests2.95.61.53.52.24.5

The results above show that in general DataNucleus with PostgreSQL server is 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 DataNucleus with PostgreSQL database server (4.5) reveals that in these tests, DataNucleus with PostgreSQL server is 2.0 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 DataNucleus with PostgreSQL database server (8.3) reveals that in that case, DataNucleus with PostgreSQL server is 3.3 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
DataNucleus
PostgreSQL server
DataNucleus
MySQL server
DataNucleus
PostgreSQL server
DataNucleus
MySQL server
DataNucleus
PostgreSQL server
Basic Person Test0.961.79.37.65.14.6
Element Collection Test0.180.730.770.630.470.68
Inheritance Test0.551.58.59.34.55.4
Indexing Test0.821.59.79.25.35.3
Graph (Binary Tree) Test2.12.63.512.32.87.4
Multithreading Test0.273.47.810.84.07.1
All Tests0.811.96.68.33.75.1

The results above show that in general DataNucleus 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 DataNucleus with PostgreSQL database server (3.4) reveals that in that case, DataNucleus with PostgreSQL server is 12.6 times faster 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
DataNucleus
PostgreSQL server
DataNucleus
MySQL server
DataNucleus
PostgreSQL server
DataNucleus
MySQL server
DataNucleus
PostgreSQL server
Basic Person Test7.249.12.24.74.726.9
Element Collection Test5.839.10.270.483.119.8
Inheritance Test2.955.91.76.62.331.2
Indexing Test0.00840.0482.56.41.23.2
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests4.036.01.74.52.820.3

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

The results above show that in general DataNucleus 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 DataNucleus with PostgreSQL database server (20.3) reveals that in these tests, DataNucleus with PostgreSQL server is 7.3 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 DataNucleus with PostgreSQL database server (55.9) reveals that in that case, DataNucleus with PostgreSQL server is 19.3 times faster 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
DataNucleus
PostgreSQL server
DataNucleus
MySQL server
DataNucleus
PostgreSQL server
DataNucleus
MySQL server
DataNucleus
PostgreSQL server
Basic Person Test0.612.11.10.840.881.5
Element Collection Test0.311.40.440.640.381.0
Inheritance Test0.512.11.81.21.11.7
Indexing Test0.682.22.21.51.51.8
Graph (Binary Tree) Test0.910.650.470.200.690.42
Multithreading Test0.640.46failedfailed0.640.46
All Tests0.611.51.20.870.881.2

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

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

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

On the other hand, DataNucleus with PostgreSQL server is slower, for instance, when using graphs of objects with large transaction size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (0.20) to the normalized speed of DataNucleus with MySQL database server (0.47) reveals that in that case, DataNucleus with PostgreSQL server is 2.3 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
DataNucleus
PostgreSQL server
DataNucleus
MySQL server
DataNucleus
PostgreSQL server
DataNucleus
MySQL server
DataNucleus
PostgreSQL server
Basic Person Test0.703.01.31.31.02.2
Element Collection Test0.171.00.400.390.290.69
Inheritance Test0.412.81.31.30.872.1
Indexing Test1.75.41.91.91.83.7
Graph (Binary Tree) Test0.490.380.460.370.470.37
Multithreading Testfailed13.8failedfailedfailed13.8
All Tests0.694.41.11.10.892.9

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

The results above show that in general DataNucleus 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 DataNucleus with PostgreSQL database server (2.9) reveals that in these tests, DataNucleus with PostgreSQL server is 3.3 times faster than DataNucleus with MySQL server.

A large 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 DataNucleus with PostgreSQL database server (2.8) reveals that in that case, DataNucleus with PostgreSQL server is 6.8 times faster 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
DataNucleus
PostgreSQL server
DataNucleus
MySQL server
DataNucleus
PostgreSQL server
DataNucleus
MySQL server
DataNucleus
PostgreSQL server
Basic Person Test2.412.03.13.42.77.7
Element Collection Test1.58.60.470.500.994.6
Inheritance Test1.413.22.94.22.18.7
Indexing Test1.43.03.85.12.64.0
Graph (Binary Tree) Test1.21.11.43.41.32.3
Multithreading Test2.48.95.19.53.59.1
All Tests1.78.02.63.82.16.0

The results above show that in general DataNucleus with PostgreSQL server is 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 DataNucleus with PostgreSQL database server (6.0) reveals that in these tests, DataNucleus with PostgreSQL server is 2.9 times faster than DataNucleus with MySQL server.

A large performance gap has been detected when using class inheritance in the object model with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with MySQL database server (1.4) to the normalized speed of DataNucleus with PostgreSQL database server (13.2) reveals that in that case, DataNucleus with PostgreSQL server is 9.4 times faster than DataNucleus with MySQL server.

Other Head to Head DBMS/JPA Comparisons