Compare with

Comparison of DataNucleus with PostgreSQL server vs OpenJPA 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
OpenJPA
Derby embedded
DataNucleus
PostgreSQL server
OpenJPA
Derby embedded
DataNucleus
PostgreSQL server
OpenJPA
Derby embedded
Basic Person Test4.14.82.62.93.33.9
Element Collection Test0.912.80.381.90.642.4
Inheritance Test3.84.12.42.43.13.3
Indexing Test6.06.16.44.16.25.1
Graph (Binary Tree) Test0.911.50.771.40.841.4
Multithreading Test18.08.78.33.313.16.0
All Tests5.64.73.52.74.53.7

The results above show that in general DataNucleus with PostgreSQL server is slightly more efficient than OpenJPA 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 OpenJPA 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 OpenJPA 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 OpenJPA with Derby embedded database (1.9) reveals that in that case, DataNucleus with PostgreSQL server is 5.0 times slower than OpenJPA with Derby embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
PostgreSQL server
OpenJPA
Derby embedded
DataNucleus
PostgreSQL server
OpenJPA
Derby embedded
DataNucleus
PostgreSQL server
OpenJPA
Derby embedded
Basic Person Test1.714.87.622.64.618.7
Element Collection Test0.730.00310.632.30.681.2
Inheritance Test1.50.0159.37.05.43.5
Indexing Test1.511.79.226.55.319.1
Graph (Binary Tree) Test2.60.9312.31.27.41.1
Multithreading Test3.425.210.828.67.126.9
All Tests1.98.88.314.75.111.7

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

A large performance gap has been detected when using simple basic entities with small retrieval size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (1.7) to the normalized speed of OpenJPA with Derby embedded database (14.8) reveals that in that case, OpenJPA with Derby embedded is 8.7 times faster than DataNucleus with PostgreSQL server.

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using JPA element collections with small retrieval size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0031) to the normalized speed of DataNucleus with PostgreSQL database server (0.73) reveals that in that case, OpenJPA with Derby embedded is 235 times slower 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
OpenJPA
Derby embedded
DataNucleus
PostgreSQL server
OpenJPA
Derby embedded
DataNucleus
PostgreSQL server
OpenJPA
Derby embedded
Basic Person Test49.149.74.79.926.929.8
Element Collection Test39.12.70.489.619.86.1
Inheritance Test55.92.36.61.331.21.8
Indexing Test0.0487.06.417.13.212.1
Multithreading Testfailed40.9failed11.7failed26.3
All Tests36.020.54.59.920.315.2

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 embedded in executing the tested JPA queries.

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

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
PostgreSQL server
OpenJPA
Derby embedded
DataNucleus
PostgreSQL server
OpenJPA
Derby embedded
DataNucleus
PostgreSQL server
OpenJPA
Derby embedded
Basic Person Test2.15.60.845.21.55.4
Element Collection Test1.40.00900.642.21.01.1
Inheritance Test2.10.0451.24.61.72.3
Indexing Test2.26.11.58.71.87.4
Graph (Binary Tree) Test0.651.60.200.910.421.3
Multithreading Test0.4618.3failed4.50.4611.4
All Tests1.55.30.874.41.24.8

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

The results above show that in general OpenJPA 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 OpenJPA with Derby embedded database (4.8) reveals that in these tests, OpenJPA with Derby embedded is 4.0 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 embedded database (18.3) reveals that in that case, OpenJPA with Derby embedded is 39.8 times faster than DataNucleus with PostgreSQL server.

On the other hand, OpenJPA with Derby embedded is slower, for instance, when using JPA element collections with small transaction size. Comparing the normalized speed of OpenJPA with Derby embedded database (0.0090) to the normalized speed of DataNucleus with PostgreSQL database server (1.4) reveals that in that case, OpenJPA with Derby embedded is 156 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
 DataNucleus
PostgreSQL server
OpenJPA
Derby embedded
DataNucleus
PostgreSQL server
OpenJPA
Derby embedded
DataNucleus
PostgreSQL server
OpenJPA
Derby embedded
Basic Person Test3.04.21.34.52.24.3
Element Collection Test1.00.00710.391.60.690.80
Inheritance Test2.80.0351.33.02.11.5
Indexing Test5.45.31.93.63.74.4
Graph (Binary Tree) Test0.380.800.370.930.370.86
Multithreading Test13.85.7failed6.213.86.0
All Tests4.42.71.13.32.93.0

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

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

A large performance gap has been detected 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 embedded database (1.6) reveals that in that case, OpenJPA with Derby embedded is 4.1 times faster than DataNucleus with PostgreSQL server.

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
PostgreSQL server
OpenJPA
Derby embedded
DataNucleus
PostgreSQL server
OpenJPA
Derby embedded
DataNucleus
PostgreSQL server
OpenJPA
Derby embedded
Basic Person Test12.015.83.49.07.712.4
Element Collection Test8.61.10.503.54.62.3
Inheritance Test13.21.34.23.78.72.5
Indexing Test3.07.25.112.04.09.6
Graph (Binary Tree) Test1.11.23.41.12.31.2
Multithreading Test8.919.89.510.99.115.3
All Tests8.08.03.86.96.07.4

The results above show that in general OpenJPA 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 OpenJPA with Derby embedded database (3.5) reveals that in that case, OpenJPA with Derby embedded is 7.0 times faster than DataNucleus with PostgreSQL server.

On the other hand, OpenJPA 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 OpenJPA with Derby embedded database (1.3) to the normalized speed of DataNucleus with PostgreSQL database server (13.2) reveals that in that case, OpenJPA with Derby embedded is 10.2 times slower than DataNucleus with PostgreSQL server.

Other Head to Head DBMS/JPA Comparisons