Compare with

Comparison of OpenJPA with PostgreSQL server vs DataNucleus with Derby 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
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
Basic Person Test5.22.84.82.35.02.6
Element Collection Test2.80.712.20.352.50.53
Inheritance Test4.62.73.22.03.92.3
Indexing Test7.44.56.94.07.14.3
Graph (Binary Tree) Test0.980.620.810.530.890.57
Multithreading Test23.44.99.13.416.24.1
All Tests7.42.74.52.15.92.4

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

A large performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of DataNucleus with Derby database server (0.35) to the normalized speed of OpenJPA with PostgreSQL database server (2.2) reveals that in that case, OpenJPA with PostgreSQL server is 6.3 times faster than DataNucleus with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
Basic Person Test5.80.5616.16.310.93.4
Element Collection Test0.0130.368.70.934.40.64
Inheritance Test5.20.4517.66.811.43.6
Indexing Test4.80.5018.77.111.83.8
Graph (Binary Tree) Test0.270.220.356.60.313.4
Multithreading Test11.91.223.310.017.65.6
All Tests4.70.5514.16.39.43.4

The results above show that in general OpenJPA with PostgreSQL server is more efficient than DataNucleus with Derby server in retrieving JPA entity objects from the database. Comparing the normalized speed of DataNucleus with Derby database server (3.4) to the normalized speed of OpenJPA with PostgreSQL database server (9.4) reveals that in these tests, OpenJPA with PostgreSQL server is 2.8 times faster than DataNucleus with Derby 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 Derby database server (0.45) to the normalized speed of OpenJPA with PostgreSQL database server (5.2) reveals that in that case, OpenJPA with PostgreSQL server is 11.6 times faster than DataNucleus with Derby 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 Derby database server (0.36) reveals that in that case, OpenJPA with PostgreSQL server is 27.7 times slower than DataNucleus with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
Basic Person Testfailed37.7failed3.6failed20.7
Element Collection Testfailed25.9failed1.4failed13.6
Inheritance Testfailed6.5failed1.8failed4.2
Indexing Testfailed0.030failed4.9failed2.5
Multithreading Testfailedfailedfailedfailedfailedfailed
All Testsfailed17.5failed2.9failed10.2

OpenJPA with PostgreSQL server has failed in 10 tests (see exceptions). DataNucleus with Derby 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
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
Basic Person Test4.91.13.90.854.40.99
Element Collection Test0.0330.814.60.622.30.71
Inheritance Test4.81.24.91.34.91.2
Indexing Test5.11.26.01.55.61.3
Graph (Binary Tree) Test0.570.290.310.410.440.35
Multithreading Test22.2failed7.4failed14.8failed
All Tests6.30.934.50.925.40.92

DataNucleus with Derby 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 Derby server in updating JPA entity objects in the database. Comparing the normalized speed of DataNucleus with Derby database server (0.92) to the normalized speed of OpenJPA with PostgreSQL database server (5.4) reveals that in these tests, OpenJPA with PostgreSQL server is 5.9 times faster than DataNucleus with Derby server.

A large performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of DataNucleus with Derby database server (0.62) to the normalized speed of OpenJPA with PostgreSQL database server (4.6) reveals that in that case, OpenJPA with PostgreSQL server is 7.4 times faster than DataNucleus with Derby 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 Derby database server (0.81) reveals that in that case, OpenJPA with PostgreSQL server is 24.5 times slower than DataNucleus with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
Basic Person Test4.61.35.31.35.01.3
Element Collection Test0.0320.612.80.331.40.47
Inheritance Test4.31.04.61.34.41.2
Indexing Test8.02.37.11.97.52.1
Graph (Binary Tree) Test0.530.260.550.460.540.36
Multithreading Test17.4failed9.1failed13.3failed
All Tests5.81.14.91.15.41.1

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

A large performance gap has been detected when using JPA element collections with large transaction size. Comparing the normalized speed of DataNucleus with Derby database server (0.33) to the normalized speed of OpenJPA with PostgreSQL database server (2.8) reveals that in that case, OpenJPA with PostgreSQL server is 8.5 times faster than DataNucleus with Derby 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 Derby database server (0.61) reveals that in that case, OpenJPA with PostgreSQL server is 19.1 times slower than DataNucleus with Derby server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
Basic Person Test5.18.77.52.96.35.8
Element Collection Test0.725.74.60.722.63.2
Inheritance Test4.72.47.62.66.22.5
Indexing Test6.31.79.73.98.02.8
Graph (Binary Tree) Test0.590.350.502.00.551.2
Multithreading Test18.73.012.26.715.54.9
All Tests6.03.87.02.86.53.3

The results above show that in general OpenJPA with PostgreSQL server is more efficient than DataNucleus with Derby server in performing JPA database operations.

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

On the other hand, OpenJPA with PostgreSQL server is slower, for instance, when using JPA element collections with small transaction/retrieval size. Comparing the normalized speed of OpenJPA with PostgreSQL database server (0.72) to the normalized speed of DataNucleus with Derby database server (5.7) reveals that in that case, OpenJPA with PostgreSQL server is 7.9 times slower than DataNucleus with Derby server.

Other Head to Head DBMS/JPA Comparisons