Compare with

Comparison of DataNucleus with PostgreSQL server vs DataNucleus with Derby embedded

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
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
Basic Person Test4.14.62.62.83.33.7
Element Collection Test0.912.40.381.60.642.0
Inheritance Test3.84.62.42.73.13.7
Indexing Test6.07.66.44.86.26.2
Graph (Binary Tree) Test0.911.60.771.40.841.5
Multithreading Test18.08.68.33.313.15.9
All Tests5.64.93.52.84.53.8

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
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
Basic Person Test1.76.87.614.94.610.9
Element Collection Test0.735.40.637.60.686.5
Inheritance Test1.58.89.314.85.411.8
Indexing Test1.59.29.214.15.311.6
Graph (Binary Tree) Test2.69.912.315.87.412.9
Multithreading Test3.411.910.811.57.111.7
All Tests1.98.78.313.15.110.9

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
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
Basic Person Test49.139.14.77.526.923.3
Element Collection Test39.146.00.486.719.826.3
Inheritance Test55.97.76.63.831.25.7
Indexing Test0.0480.0536.48.03.24.0
Multithreading Testfailedfailedfailedfailedfailedfailed
All Tests36.023.24.56.520.314.8

DataNucleus with PostgreSQL server has failed in 2 tests (see exceptions). DataNucleus with Derby embedded 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
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
Basic Person Test2.14.00.843.81.53.9
Element Collection Test1.43.70.644.51.04.1
Inheritance Test2.14.41.24.81.74.6
Indexing Test2.25.21.54.21.84.7
Graph (Binary Tree) Test0.652.70.201.50.422.1
Multithreading Test0.46failedfailedfailed0.46failed
All Tests1.54.00.873.71.23.9

DataNucleus with PostgreSQL server has failed in 1 tests (see exceptions). DataNucleus with Derby embedded has failed in 2 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
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
Basic Person Test3.03.51.31.32.22.4
Element Collection Test1.01.90.391.60.691.7
Inheritance Test2.82.41.31.32.11.9
Indexing Test5.46.61.91.93.74.3
Graph (Binary Tree) Test0.380.810.370.930.370.87
Multithreading Test13.8failedfailedfailed13.8failed
All Tests4.43.01.11.42.92.2

DataNucleus with PostgreSQL server has failed in 1 tests (see exceptions). DataNucleus with Derby embedded 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 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
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
DataNucleus
PostgreSQL server
DataNucleus
Derby embedded
Basic Person Test12.011.63.46.17.78.8
Element Collection Test8.611.90.504.44.68.1
Inheritance Test13.25.64.25.58.75.5
Indexing Test3.05.75.16.64.06.2
Graph (Binary Tree) Test1.13.73.44.92.34.3
Multithreading Test8.910.39.57.49.18.8
All Tests8.08.03.85.76.06.9

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