Compare with

Comparison of DataNucleus with PostgreSQL server vs OpenJPA 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
 DataNucleus
PostgreSQL server
OpenJPA
MySQL server
DataNucleus
PostgreSQL server
OpenJPA
MySQL server
DataNucleus
PostgreSQL server
OpenJPA
MySQL server
Basic Person Test4.13.92.61.63.32.7
Element Collection Test0.911.60.380.680.641.1
Inheritance Test3.83.62.41.43.12.5
Indexing Test6.05.66.42.46.24.0
Graph (Binary Tree) Test0.910.680.770.570.840.63
Multithreading Test18.07.28.32.713.14.9
All Tests5.63.73.51.54.52.6

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

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

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
PostgreSQL server
OpenJPA
MySQL server
DataNucleus
PostgreSQL server
OpenJPA
MySQL server
DataNucleus
PostgreSQL server
OpenJPA
MySQL server
Basic Person Test1.73.27.622.74.612.9
Element Collection Test0.730.00380.632.90.681.4
Inheritance Test1.50.0179.36.95.43.4
Indexing Test1.52.49.223.45.312.9
Graph (Binary Tree) Test2.60.2712.30.357.40.31
Multithreading Test3.40.1410.818.17.19.1
All Tests1.91.08.312.45.16.7

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

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

On the other hand, OpenJPA with MySQL server is slower, for instance, when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with MySQL database server (0.0038) to the normalized speed of DataNucleus with PostgreSQL database server (0.73) reveals that in that case, OpenJPA with MySQL server is 192 times slower than DataNucleus with PostgreSQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
PostgreSQL server
OpenJPA
MySQL server
DataNucleus
PostgreSQL server
OpenJPA
MySQL server
DataNucleus
PostgreSQL server
OpenJPA
MySQL server
Basic Person Test49.19.34.72.226.95.8
Element Collection Test39.14.80.481.119.82.9
Inheritance Test55.91.56.60.9031.21.2
Indexing Test0.0480.316.42.13.21.2
Multithreading Testfailed1.9failed0.99failed1.4
All Tests36.03.64.51.520.32.5

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 OpenJPA with MySQL server in executing the tested JPA queries. Comparing the normalized speed of OpenJPA with MySQL database server (2.5) to the normalized speed of DataNucleus with PostgreSQL database server (20.3) reveals that in these tests, DataNucleus with PostgreSQL server is 8.1 times faster than OpenJPA 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 OpenJPA with MySQL database server (1.5) to the normalized speed of DataNucleus with PostgreSQL database server (55.9) reveals that in that case, DataNucleus with PostgreSQL server is 37.3 times faster than OpenJPA with MySQL server.

On the other hand, DataNucleus with PostgreSQL server is slower, for instance, when using database indexes with small retrieval size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (0.048) to the normalized speed of OpenJPA with MySQL database server (0.31) reveals that in that case, DataNucleus with PostgreSQL server is 6.5 times slower than OpenJPA with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
PostgreSQL server
OpenJPA
MySQL server
DataNucleus
PostgreSQL server
OpenJPA
MySQL server
DataNucleus
PostgreSQL server
OpenJPA
MySQL server
Basic Person Test2.10.740.841.61.51.2
Element Collection Test1.40.0140.641.71.00.87
Inheritance Test2.10.0481.22.01.71.0
Indexing Test2.20.741.53.01.81.9
Graph (Binary Tree) Test0.650.450.200.250.420.35
Multithreading Test0.460.55failed2.90.461.7
All Tests1.50.420.871.91.21.2

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

The results above show that in general DataNucleus with PostgreSQL server is equivalent to OpenJPA with MySQL server in updating JPA entity objects in the database.

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

On the other hand, DataNucleus with PostgreSQL server is slower, for instance, when using JPA element collections with large transaction size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (0.64) to the normalized speed of OpenJPA with MySQL database server (1.7) reveals that in that case, DataNucleus with PostgreSQL server is 2.7 times slower than OpenJPA with MySQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
PostgreSQL server
OpenJPA
MySQL server
DataNucleus
PostgreSQL server
OpenJPA
MySQL server
DataNucleus
PostgreSQL server
OpenJPA
MySQL server
Basic Person Test3.00.981.31.72.21.4
Element Collection Test1.00.00990.390.650.690.33
Inheritance Test2.80.0331.31.52.10.75
Indexing Test5.40.641.92.03.71.3
Graph (Binary Tree) Test0.380.410.370.430.370.42
Multithreading Test13.80.27failed2.913.81.6
All Tests4.40.391.11.52.90.96

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 OpenJPA with MySQL server in deleting JPA entity objects from the database. Comparing the normalized speed of OpenJPA with MySQL database server (0.96) to the normalized speed of DataNucleus with PostgreSQL database server (2.9) reveals that in these tests, DataNucleus with PostgreSQL server is 3.0 times faster than OpenJPA with MySQL server.

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
PostgreSQL server
OpenJPA
MySQL server
DataNucleus
PostgreSQL server
OpenJPA
MySQL server
DataNucleus
PostgreSQL server
OpenJPA
MySQL server
Basic Person Test12.03.63.46.07.74.8
Element Collection Test8.61.30.501.44.61.3
Inheritance Test13.21.04.22.58.71.8
Indexing Test3.01.95.16.64.04.3
Graph (Binary Tree) Test1.10.453.40.402.30.43
Multithreading Test8.92.09.55.59.13.8
All Tests8.01.83.83.96.02.8

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

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

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

Other Head to Head DBMS/JPA Comparisons