Compare with

Comparison of OpenJPA with Derby server vs DataNucleus 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
 OpenJPA
Derby server
DataNucleus
PostgreSQL server
OpenJPA
Derby server
DataNucleus
PostgreSQL server
OpenJPA
Derby server
DataNucleus
PostgreSQL server
Basic Person Test3.14.12.72.62.93.3
Element Collection Test2.00.911.70.381.80.64
Inheritance Test3.03.82.32.42.63.1
Indexing Test4.76.04.16.44.46.2
Graph (Binary Tree) Test0.710.910.640.770.670.84
Multithreading Test6.018.03.88.34.913.1
All Tests3.35.62.53.52.94.5

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

A large performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of OpenJPA with Derby database server (6.0) to the normalized speed of DataNucleus with PostgreSQL database server (18.0) reveals that in that case, DataNucleus with PostgreSQL server is 3.0 times faster than OpenJPA with Derby 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.38) to the normalized speed of OpenJPA with Derby database server (1.7) reveals that in that case, DataNucleus with PostgreSQL server is 4.5 times slower than OpenJPA with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
DataNucleus
PostgreSQL server
OpenJPA
Derby server
DataNucleus
PostgreSQL server
OpenJPA
Derby server
DataNucleus
PostgreSQL server
Basic Person Test0.781.711.67.66.24.6
Element Collection Test0.00240.731.10.630.540.68
Inheritance Test0.0141.55.09.32.55.4
Indexing Test0.621.513.09.26.85.3
Graph (Binary Tree) Test0.0652.60.3912.30.237.4
Multithreading Test1.63.419.010.810.37.1
All Tests0.511.98.48.34.45.1

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

A huge performance gap has been detected when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with Derby database server (0.0024) to the normalized speed of DataNucleus with PostgreSQL database server (0.73) reveals that in that case, DataNucleus with PostgreSQL server is 304 times faster than OpenJPA with Derby server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
DataNucleus
PostgreSQL server
OpenJPA
Derby server
DataNucleus
PostgreSQL server
OpenJPA
Derby server
DataNucleus
PostgreSQL server
Basic Person Test29.249.15.54.717.326.9
Element Collection Test2.239.11.40.481.819.8
Inheritance Test2.255.91.06.61.631.2
Indexing Test2.20.04811.76.47.03.2
Multithreading Test35.5failed8.3failed21.9failed
All Tests14.336.05.64.59.920.3

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

The results above show that in general DataNucleus with PostgreSQL server is more efficient than OpenJPA with Derby server in executing the tested JPA queries. Comparing the normalized speed of OpenJPA with Derby database server (9.9) to the normalized speed of DataNucleus with PostgreSQL database server (20.3) reveals that in these tests, DataNucleus with PostgreSQL server is 2.1 times faster than OpenJPA 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 OpenJPA with Derby database server (2.2) to the normalized speed of DataNucleus with PostgreSQL database server (55.9) reveals that in that case, DataNucleus with PostgreSQL server is 25.4 times faster than OpenJPA with Derby 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 Derby database server (2.2) reveals that in that case, DataNucleus with PostgreSQL server is 45.8 times slower than OpenJPA with Derby server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
DataNucleus
PostgreSQL server
OpenJPA
Derby server
DataNucleus
PostgreSQL server
OpenJPA
Derby server
DataNucleus
PostgreSQL server
Basic Person Test1.52.14.00.842.81.5
Element Collection Test0.00811.41.90.640.941.0
Inheritance Test0.0432.13.81.21.91.7
Indexing Test1.82.26.81.54.31.8
Graph (Binary Tree) Test0.160.650.270.200.220.42
Multithreading Test6.90.465.0failed5.90.46
All Tests1.71.53.60.872.71.2

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

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

A huge performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (0.46) to the normalized speed of OpenJPA with Derby database server (6.9) reveals that in that case, OpenJPA with Derby server is 15.0 times faster than DataNucleus with PostgreSQL server.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
DataNucleus
PostgreSQL server
OpenJPA
Derby server
DataNucleus
PostgreSQL server
OpenJPA
Derby server
DataNucleus
PostgreSQL server
Basic Person Test1.43.03.71.32.52.2
Element Collection Test0.00821.01.40.390.710.69
Inheritance Test0.0352.82.51.31.32.1
Indexing Test2.35.43.51.92.93.7
Graph (Binary Tree) Test0.130.380.350.370.240.37
Multithreading Test3.613.84.0failed3.813.8
All Tests1.34.42.61.11.92.9

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

The results above show that in general DataNucleus with PostgreSQL server is more efficient than OpenJPA with Derby server in deleting JPA entity objects from 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 Derby database server (0.0082) to the normalized speed of DataNucleus with PostgreSQL database server (1.0) reveals that in that case, DataNucleus with PostgreSQL server is 122 times faster than OpenJPA with Derby 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.39) to the normalized speed of OpenJPA with Derby database server (1.4) reveals that in that case, DataNucleus with PostgreSQL server is 3.6 times slower than OpenJPA with Derby server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 OpenJPA
Derby server
DataNucleus
PostgreSQL server
OpenJPA
Derby server
DataNucleus
PostgreSQL server
OpenJPA
Derby server
DataNucleus
PostgreSQL server
Basic Person Test7.212.05.53.46.47.7
Element Collection Test0.848.61.50.501.24.6
Inheritance Test1.113.22.94.22.08.7
Indexing Test2.33.07.85.15.14.0
Graph (Binary Tree) Test0.271.10.413.40.342.3
Multithreading Test10.78.98.09.59.49.1
All Tests3.98.04.53.84.26.0

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

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 Derby database server (1.1) to the normalized speed of DataNucleus with PostgreSQL database server (13.2) reveals that in that case, DataNucleus with PostgreSQL server is 12.0 times faster than OpenJPA with Derby 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 Derby database server (1.5) reveals that in that case, DataNucleus with PostgreSQL server is 3.0 times slower than OpenJPA with Derby server.

Other Head to Head DBMS/JPA Comparisons