Compare with

Comparison of DataNucleus with MySQL server vs OpenJPA 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
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
Basic Person Test2.65.21.44.82.05.0
Element Collection Test1.02.80.482.20.762.5
Inheritance Test2.54.61.33.21.93.9
Indexing Test4.07.42.56.93.37.1
Graph (Binary Tree) Test1.10.980.990.811.10.89
Multithreading Test6.223.42.59.14.416.2
All Tests2.97.41.54.52.25.9

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

A large performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of DataNucleus with MySQL database server (0.48) to the normalized speed of OpenJPA with PostgreSQL database server (2.2) reveals that in that case, OpenJPA with PostgreSQL server is 4.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
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
Basic Person Test0.965.89.316.15.110.9
Element Collection Test0.180.0130.778.70.474.4
Inheritance Test0.555.28.517.64.511.4
Indexing Test0.824.89.718.75.311.8
Graph (Binary Tree) Test2.10.273.50.352.80.31
Multithreading Test0.2711.97.823.34.017.6
All Tests0.814.76.614.13.79.4

The results above show that in general OpenJPA with PostgreSQL server is more efficient than DataNucleus with MySQL server in retrieving JPA entity objects from the database. Comparing the normalized speed of DataNucleus with MySQL database server (3.7) to the normalized speed of OpenJPA with PostgreSQL database server (9.4) reveals that in these tests, OpenJPA with PostgreSQL server is 2.5 times faster than DataNucleus with MySQL server.

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 OpenJPA with PostgreSQL database server (11.9) reveals that in that case, OpenJPA with PostgreSQL server is 44.1 times faster than DataNucleus with MySQL server.

On the other hand, OpenJPA with PostgreSQL server is slower, for instance, when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.013) to the normalized speed of DataNucleus with MySQL database server (0.18) reveals that in that case, OpenJPA with PostgreSQL server is 13.8 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
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
Basic Person Test7.2failed2.2failed4.7failed
Element Collection Test5.8failed0.27failed3.1failed
Inheritance Test2.9failed1.7failed2.3failed
Indexing Test0.0084failed2.5failed1.2failed
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests4.0failed1.7failed2.8failed

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
Basic Person Test0.614.91.13.90.884.4
Element Collection Test0.310.0330.444.60.382.3
Inheritance Test0.514.81.84.91.14.9
Indexing Test0.685.12.26.01.55.6
Graph (Binary Tree) Test0.910.570.470.310.690.44
Multithreading Test0.6422.2failed7.40.6414.8
All Tests0.616.31.24.50.885.4

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

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

On the other hand, OpenJPA with PostgreSQL server is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.033) to the normalized speed of DataNucleus with MySQL database server (0.31) reveals that in that case, OpenJPA with PostgreSQL server is 9.4 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
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
Basic Person Test0.704.61.35.31.05.0
Element Collection Test0.170.0320.402.80.291.4
Inheritance Test0.414.31.34.60.874.4
Indexing Test1.78.01.97.11.87.5
Graph (Binary Tree) Test0.490.530.460.550.470.54
Multithreading Testfailed17.4failed9.1failed13.3
All Tests0.695.81.14.90.895.4

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

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

On the other hand, OpenJPA with PostgreSQL server is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.032) to the normalized speed of DataNucleus with MySQL database server (0.17) reveals that in that case, OpenJPA with PostgreSQL server is 5.3 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
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
Basic Person Test2.45.13.17.52.76.3
Element Collection Test1.50.720.474.60.992.6
Inheritance Test1.44.72.97.62.16.2
Indexing Test1.46.33.89.72.68.0
Graph (Binary Tree) Test1.20.591.40.501.30.55
Multithreading Test2.418.75.112.23.515.5
All Tests1.76.02.67.02.16.5

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

A large performance gap has been detected when using JPA element collections with large transaction/retrieval size. Comparing the normalized speed of DataNucleus with MySQL database server (0.47) to the normalized speed of OpenJPA with PostgreSQL database server (4.6) reveals that in that case, OpenJPA with PostgreSQL server is 9.8 times faster than DataNucleus with MySQL server.

On the other hand, OpenJPA with PostgreSQL server is slower, for instance, when using graphs of objects with large transaction/retrieval size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.50) to the normalized speed of DataNucleus with MySQL database server (1.4) reveals that in that case, OpenJPA with PostgreSQL server is 2.8 times slower than DataNucleus with MySQL server.

Other Head to Head DBMS/JPA Comparisons