Compare with

Comparison of DataNucleus with Derby 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
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
Basic Person Test2.85.22.34.82.65.0
Element Collection Test0.712.80.352.20.532.5
Inheritance Test2.74.62.03.22.33.9
Indexing Test4.57.44.06.94.37.1
Graph (Binary Tree) Test0.620.980.530.810.570.89
Multithreading Test4.923.43.49.14.116.2
All Tests2.77.42.14.52.45.9

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
 DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
Basic Person Test0.565.86.316.13.410.9
Element Collection Test0.360.0130.938.70.644.4
Inheritance Test0.455.26.817.63.611.4
Indexing Test0.504.87.118.73.811.8
Graph (Binary Tree) Test0.220.276.60.353.40.31
Multithreading Test1.211.910.023.35.617.6
All Tests0.554.76.314.13.49.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
 DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
Basic Person Test37.7failed3.6failed20.7failed
Element Collection Test25.9failed1.4failed13.6failed
Inheritance Test6.5failed1.8failed4.2failed
Indexing Test0.030failed4.9failed2.5failed
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests17.5failed2.9failed10.2failed

DataNucleus with Derby 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
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
Basic Person Test1.14.90.853.90.994.4
Element Collection Test0.810.0330.624.60.712.3
Inheritance Test1.24.81.34.91.24.9
Indexing Test1.25.11.56.01.35.6
Graph (Binary Tree) Test0.290.570.410.310.350.44
Multithreading Testfailed22.2failed7.4failed14.8
All Tests0.936.30.924.50.925.4

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
 DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
Basic Person Test1.34.61.35.31.35.0
Element Collection Test0.610.0320.332.80.471.4
Inheritance Test1.04.31.34.61.24.4
Indexing Test2.38.01.97.12.17.5
Graph (Binary Tree) Test0.260.530.460.550.360.54
Multithreading Testfailed17.4failed9.1failed13.3
All Tests1.15.81.14.91.15.4

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
 DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
DataNucleus
Derby server
OpenJPA
PostgreSQL server
Basic Person Test8.75.12.97.55.86.3
Element Collection Test5.70.720.724.63.22.6
Inheritance Test2.44.72.67.62.56.2
Indexing Test1.76.33.99.72.88.0
Graph (Binary Tree) Test0.350.592.00.501.20.55
Multithreading Test3.018.76.712.24.915.5
All Tests3.86.02.87.03.36.5

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