Compare with

Comparison of DataNucleus with H2 embedded vs EclipseLink 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
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
Basic Person Test19.27.38.04.213.65.8
Element Collection Test6.63.12.81.94.72.5
Inheritance Test15.66.94.45.010.05.9
Indexing Test24.410.011.86.818.18.4
Graph (Binary Tree) Test9.23.56.23.37.73.4
Multithreading Test34.931.87.114.521.023.1
All Tests18.310.46.76.012.58.2

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

A large performance gap has been detected when using simple basic entities with small transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (7.3) to the normalized speed of DataNucleus with H2 embedded database (19.2) reveals that in that case, DataNucleus with H2 embedded is 2.6 times faster than EclipseLink with PostgreSQL server.

On the other hand, DataNucleus with H2 embedded is slower, for instance, when using multithreading with large transaction size. Comparing the normalized speed of DataNucleus with H2 embedded database (7.1) to the normalized speed of EclipseLink with PostgreSQL database server (14.5) reveals that in that case, DataNucleus with H2 embedded is 2.0 times slower than EclipseLink with PostgreSQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
Basic Person Test13.26.813.517.213.312.0
Element Collection Test6.40.0268.90.0207.70.023
Inheritance Test12.26.012.719.712.412.9
Indexing Test8.15.616.519.512.312.6
Graph (Binary Tree) Test10.60.4720.90.6115.80.54
Multithreading Test13.313.59.927.811.620.6
All Tests10.65.413.714.112.29.8

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

A huge performance gap has been detected when using JPA element collections with large retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.020) to the normalized speed of DataNucleus with H2 embedded database (8.9) reveals that in that case, DataNucleus with H2 embedded is 445 times faster than EclipseLink with PostgreSQL server.

On the other hand, DataNucleus with H2 embedded is slower, for instance, when using multithreading with large retrieval size. Comparing the normalized speed of DataNucleus with H2 embedded database (9.9) to the normalized speed of EclipseLink with PostgreSQL database server (27.8) reveals that in that case, DataNucleus with H2 embedded is 2.8 times slower than EclipseLink with PostgreSQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
Basic Person Test4.755.51.47.83.131.6
Element Collection Test5.015.42.40.0283.77.7
Inheritance Test3.854.91.611.52.733.2
Indexing Test0.00410.0771.810.00.915.1
Multithreading Test1.255.30.7912.01.033.7
All Tests3.036.21.68.32.322.3

The results above show that in general EclipseLink with PostgreSQL server is much more efficient than DataNucleus with H2 embedded in executing the tested JPA queries. Comparing the normalized speed of DataNucleus with H2 embedded database (2.3) to the normalized speed of EclipseLink with PostgreSQL database server (22.3) reveals that in these tests, EclipseLink with PostgreSQL server is 9.7 times faster than DataNucleus with H2 embedded.

A huge performance gap has been detected when using multithreading with small retrieval size. Comparing the normalized speed of DataNucleus with H2 embedded database (1.2) to the normalized speed of EclipseLink with PostgreSQL database server (55.3) reveals that in that case, EclipseLink with PostgreSQL server is 46.1 times faster than DataNucleus with H2 embedded.

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

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
Basic Person Test10.06.23.94.16.95.1
Element Collection Test7.60.0803.90.0285.80.054
Inheritance Test9.46.44.46.16.96.2
Indexing Test10.66.55.97.08.26.8
Graph (Binary Tree) Test5.90.903.70.504.80.70
Multithreading Testfailed36.0failed9.1failed22.5
All Tests8.79.34.44.56.56.9

DataNucleus with H2 embedded has failed in 2 tests (see exceptions).

The results above show that in general EclipseLink with PostgreSQL server is slightly more efficient than DataNucleus with H2 embedded in updating JPA entity objects in the database.

On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using JPA element collections with large transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.028) to the normalized speed of DataNucleus with H2 embedded database (3.9) reveals that in that case, EclipseLink with PostgreSQL server is 139 times slower than DataNucleus with H2 embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
Basic Person Test4.25.71.35.72.85.7
Element Collection Test4.90.0251.6stopped3.20.012
Inheritance Test4.05.51.35.42.75.4
Indexing Test7.510.41.910.04.710.2
Graph (Binary Tree) Test5.60.0164.10.0134.80.015
Multithreading Testfailed26.3failed16.8failed21.6
All Tests5.28.02.06.33.67.2

DataNucleus with H2 embedded has failed in 2 tests (see exceptions).

The results above show that in general EclipseLink with PostgreSQL server is more efficient than DataNucleus with H2 embedded in deleting JPA entity objects from the database. Comparing the normalized speed of DataNucleus with H2 embedded database (3.6) to the normalized speed of EclipseLink with PostgreSQL database server (7.2) reveals that in these tests, EclipseLink with PostgreSQL server is 2.0 times faster than DataNucleus with H2 embedded.

A large performance gap has been detected when using database indexes with large transaction size. Comparing the normalized speed of DataNucleus with H2 embedded database (1.9) to the normalized speed of EclipseLink with PostgreSQL database server (10.0) reveals that in that case, EclipseLink with PostgreSQL server is 5.3 times faster than DataNucleus with H2 embedded.

On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using graphs of objects with small transaction size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.016) to the normalized speed of DataNucleus with H2 embedded database (5.6) reveals that in that case, EclipseLink with PostgreSQL server is 350 times slower than DataNucleus with H2 embedded.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
Basic Person Test10.316.35.67.87.912.1
Element Collection Test6.13.73.90.405.02.1
Inheritance Test9.015.94.99.56.912.7
Indexing Test10.16.57.610.78.98.6
Graph (Binary Tree) Test7.81.28.71.18.31.2
Multithreading Test16.532.65.916.011.224.3
All Tests9.613.16.07.87.810.5

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

A large performance gap has been detected when using multithreading with large transaction/retrieval size. Comparing the normalized speed of DataNucleus with H2 embedded database (5.9) to the normalized speed of EclipseLink with PostgreSQL database server (16.0) reveals that in that case, EclipseLink with PostgreSQL server is 2.7 times faster than DataNucleus with H2 embedded.

On the other hand, EclipseLink with PostgreSQL server is slower, for instance, when using JPA element collections with large transaction/retrieval size. Comparing the normalized speed of EclipseLink with PostgreSQL database server (0.40) to the normalized speed of DataNucleus with H2 embedded database (3.9) reveals that in that case, EclipseLink with PostgreSQL server is 9.8 times slower than DataNucleus with H2 embedded.

Other Head to Head DBMS/JPA Comparisons