Compare with

Comparison of OpenJPA 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
 OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
Basic Person Test5.22.64.81.45.02.0
Element Collection Test2.81.02.20.482.50.76
Inheritance Test4.62.53.21.33.91.9
Indexing Test7.44.06.92.57.13.3
Graph (Binary Tree) Test0.981.10.810.990.891.1
Multithreading Test23.46.29.12.516.24.4
All Tests7.42.94.51.55.92.2

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
 OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
Basic Person Test5.80.9616.19.310.95.1
Element Collection Test0.0130.188.70.774.40.47
Inheritance Test5.20.5517.68.511.44.5
Indexing Test4.80.8218.79.711.85.3
Graph (Binary Tree) Test0.272.10.353.50.312.8
Multithreading Test11.90.2723.37.817.64.0
All Tests4.70.8114.16.69.43.7

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
 OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
Basic Person Testfailed7.2failed2.2failed4.7
Element Collection Testfailed5.8failed0.27failed3.1
Inheritance Testfailed2.9failed1.7failed2.3
Indexing Testfailed0.0084failed2.5failed1.2
Multithreading Testfailedfailedfailedfailedfailedfailed
All Testsfailed4.0failed1.7failed2.8

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
Basic Person Test4.90.613.91.14.40.88
Element Collection Test0.0330.314.60.442.30.38
Inheritance Test4.80.514.91.84.91.1
Indexing Test5.10.686.02.25.61.5
Graph (Binary Tree) Test0.570.910.310.470.440.69
Multithreading Test22.20.647.4failed14.80.64
All Tests6.30.614.51.25.40.88

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
 OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
Basic Person Test4.60.705.31.35.01.0
Element Collection Test0.0320.172.80.401.40.29
Inheritance Test4.30.414.61.34.40.87
Indexing Test8.01.77.11.97.51.8
Graph (Binary Tree) Test0.530.490.550.460.540.47
Multithreading Test17.4failed9.1failed13.3failed
All Tests5.80.694.91.15.40.89

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
 OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
OpenJPA
PostgreSQL server
DataNucleus
MySQL server
Basic Person Test5.12.47.53.16.32.7
Element Collection Test0.721.54.60.472.60.99
Inheritance Test4.71.47.62.96.22.1
Indexing Test6.31.49.73.88.02.6
Graph (Binary Tree) Test0.591.20.501.40.551.3
Multithreading Test18.72.412.25.115.53.5
All Tests6.01.77.02.66.52.1

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