Compare with

Comparison of DataNucleus with Derby embedded 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
 DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
Basic Person Test4.64.12.82.63.73.3
Element Collection Test2.40.911.60.382.00.64
Inheritance Test4.63.82.72.43.73.1
Indexing Test7.66.04.86.46.26.2
Graph (Binary Tree) Test1.60.911.40.771.50.84
Multithreading Test8.618.03.38.35.913.1
All Tests4.95.62.83.53.84.5

The results above show that in general DataNucleus with PostgreSQL server is slightly more efficient than DataNucleus with Derby embedded 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 DataNucleus with Derby embedded database (3.3) to the normalized speed of DataNucleus with PostgreSQL database server (8.3) reveals that in that case, DataNucleus with PostgreSQL server is 2.5 times faster than DataNucleus with Derby embedded.

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 DataNucleus with Derby embedded database (1.6) reveals that in that case, DataNucleus with PostgreSQL server is 4.2 times slower than DataNucleus with Derby embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
Basic Person Test6.81.714.97.610.94.6
Element Collection Test5.40.737.60.636.50.68
Inheritance Test8.81.514.89.311.85.4
Indexing Test9.21.514.19.211.65.3
Graph (Binary Tree) Test9.92.615.812.312.97.4
Multithreading Test11.93.411.510.811.77.1
All Tests8.71.913.18.310.95.1

The results above show that in general DataNucleus with Derby embedded is more efficient than DataNucleus with PostgreSQL server in retrieving JPA entity objects from the database. Comparing the normalized speed of DataNucleus with PostgreSQL database server (5.1) to the normalized speed of DataNucleus with Derby embedded database (10.9) reveals that in these tests, DataNucleus with Derby embedded is 2.1 times faster than DataNucleus with PostgreSQL server.

A huge 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 DataNucleus with Derby embedded database (7.6) reveals that in that case, DataNucleus with Derby embedded is 12.1 times faster than DataNucleus with PostgreSQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
Basic Person Test39.149.17.54.723.326.9
Element Collection Test46.039.16.70.4826.319.8
Inheritance Test7.755.93.86.65.731.2
Indexing Test0.0530.0488.06.44.03.2
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests23.236.06.54.514.820.3

DataNucleus with Derby embedded has failed in 2 tests (see exceptions). 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 DataNucleus with Derby embedded in executing the tested JPA queries.

A large 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 embedded database (7.7) to the normalized speed of DataNucleus with PostgreSQL database server (55.9) reveals that in that case, DataNucleus with PostgreSQL server is 7.3 times faster than DataNucleus with Derby embedded.

On the other hand, DataNucleus with PostgreSQL server is slower, for instance, when using JPA element collections with large retrieval size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (0.48) to the normalized speed of DataNucleus with Derby embedded database (6.7) reveals that in that case, DataNucleus with PostgreSQL server is 14.0 times slower than DataNucleus with Derby embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
Basic Person Test4.02.13.80.843.91.5
Element Collection Test3.71.44.50.644.11.0
Inheritance Test4.42.14.81.24.61.7
Indexing Test5.22.24.21.54.71.8
Graph (Binary Tree) Test2.70.651.50.202.10.42
Multithreading Testfailed0.46failedfailedfailed0.46
All Tests4.01.53.70.873.91.2

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

The results above show that in general DataNucleus with Derby embedded is much 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 DataNucleus with Derby embedded database (3.9) reveals that in these tests, DataNucleus with Derby embedded is 3.2 times faster than DataNucleus with PostgreSQL server.

A large performance gap has been detected when using graphs of objects with large transaction size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (0.20) to the normalized speed of DataNucleus with Derby embedded database (1.5) reveals that in that case, DataNucleus with Derby embedded is 7.5 times faster than DataNucleus with PostgreSQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
Basic Person Test3.53.01.31.32.42.2
Element Collection Test1.91.01.60.391.70.69
Inheritance Test2.42.81.31.31.92.1
Indexing Test6.65.41.91.94.33.7
Graph (Binary Tree) Test0.810.380.930.370.870.37
Multithreading Testfailed13.8failedfailedfailed13.8
All Tests3.04.41.41.12.22.9

DataNucleus with Derby embedded has failed in 2 tests (see exceptions). 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 DataNucleus with Derby embedded in deleting JPA entity objects from the database.

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 DataNucleus with Derby embedded database (1.6) reveals that in that case, DataNucleus with PostgreSQL server is 4.1 times slower than DataNucleus with Derby embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
Basic Person Test11.612.06.13.48.87.7
Element Collection Test11.98.64.40.508.14.6
Inheritance Test5.613.25.54.25.58.7
Indexing Test5.73.06.65.16.24.0
Graph (Binary Tree) Test3.71.14.93.44.32.3
Multithreading Test10.38.97.49.58.89.1
All Tests8.08.05.73.86.96.0

The results above show that in general DataNucleus with Derby embedded is slightly more efficient than DataNucleus with PostgreSQL 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 PostgreSQL database server (0.50) to the normalized speed of DataNucleus with Derby embedded database (4.4) reveals that in that case, DataNucleus with Derby embedded is 8.8 times faster than DataNucleus with PostgreSQL server.

On the other hand, DataNucleus with Derby embedded is slower, for instance, when using class inheritance in the object model with small transaction/retrieval size. Comparing the normalized speed of DataNucleus with Derby embedded database (5.6) to the normalized speed of DataNucleus with PostgreSQL database server (13.2) reveals that in that case, DataNucleus with Derby embedded is 2.4 times slower than DataNucleus with PostgreSQL server.

Other Head to Head DBMS/JPA Comparisons