Compare with

Comparison of EclipseLink with H2 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
 EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
Basic Person Test25.14.18.92.617.03.3
Element Collection Test20.40.918.00.3814.20.64
Inheritance Test28.73.88.72.418.73.1
Indexing Test37.66.014.06.425.86.2
Graph (Binary Tree) Test17.70.9114.70.7716.20.84
Multithreading Test30.318.011.48.320.813.1
All Tests26.65.610.93.518.84.5

The results above show that in general EclipseLink with H2 embedded is much more efficient than DataNucleus with PostgreSQL server in persisting JPA entity objects to the database. Comparing the normalized speed of DataNucleus with PostgreSQL database server (4.5) to the normalized speed of EclipseLink with H2 embedded database (18.8) reveals that in these tests, EclipseLink with H2 embedded is 4.2 times faster than DataNucleus with PostgreSQL server.

A huge performance gap has been detected when using JPA element collections with small transaction size. Comparing the normalized speed of DataNucleus with PostgreSQL database server (0.91) to the normalized speed of EclipseLink with H2 embedded database (20.4) reveals that in that case, EclipseLink with H2 embedded is 22.4 times faster than DataNucleus with PostgreSQL server.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
Basic Person Test30.41.729.17.629.74.6
Element Collection Test19.60.7327.60.6323.60.68
Inheritance Test33.81.539.89.336.85.4
Indexing Test22.21.541.39.231.85.3
Graph (Binary Tree) Test16.02.620.012.318.07.4
Multithreading Test33.73.429.010.831.47.1
All Tests25.91.931.18.328.55.1

The results above show that in general EclipseLink with H2 embedded is much 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 EclipseLink with H2 embedded database (28.5) reveals that in these tests, EclipseLink with H2 embedded is 5.6 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 EclipseLink with H2 embedded database (27.6) reveals that in that case, EclipseLink with H2 embedded is 43.8 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
 EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
Basic Person Test4.449.11.44.72.926.9
Element Collection Test4.139.12.40.483.219.8
Inheritance Test3.455.92.06.62.731.2
Indexing Test13.00.04822.86.417.93.2
Multithreading Test1.0failed0.67failed0.85failed
All Tests5.236.05.94.55.520.3

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

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

A huge performance gap has been detected when using class inheritance in the object model with small retrieval size. Comparing the normalized speed of EclipseLink with H2 embedded database (3.4) to the normalized speed of DataNucleus with PostgreSQL database server (55.9) reveals that in that case, DataNucleus with PostgreSQL server is 16.4 times faster than EclipseLink with H2 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 EclipseLink with H2 embedded database (13.0) reveals that in that case, DataNucleus with PostgreSQL server is 271 times slower than EclipseLink with H2 embedded.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
Basic Person Test16.62.17.60.8412.11.5
Element Collection Test15.31.410.50.6412.91.0
Inheritance Test15.72.19.81.212.71.7
Indexing Test12.12.29.91.511.01.8
Graph (Binary Tree) Test13.70.657.00.2010.30.42
Multithreading Test20.90.464.2failed12.60.46
All Tests15.71.58.20.8712.01.2

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

The results above show that in general EclipseLink with H2 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 EclipseLink with H2 embedded database (12.0) reveals that in these tests, EclipseLink with H2 embedded is 10.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 EclipseLink with H2 embedded database (20.9) reveals that in that case, EclipseLink with H2 embedded is 45.4 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
 EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
Basic Person Test35.13.019.61.327.42.2
Element Collection Test19.31.08.50.3913.90.69
Inheritance Test36.02.814.01.325.02.1
Indexing Test42.55.419.21.930.93.7
Graph (Binary Tree) Test12.20.3814.40.3713.30.37
Multithreading Test54.413.825.8failed40.113.8
All Tests33.34.416.91.125.12.9

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

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

A huge 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.37) to the normalized speed of EclipseLink with H2 embedded database (14.4) reveals that in that case, EclipseLink with H2 embedded is 38.9 times faster than DataNucleus with PostgreSQL server.

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
EclipseLink
H2 embedded
DataNucleus
PostgreSQL server
Basic Person Test22.312.013.33.417.87.7
Element Collection Test15.78.611.40.5013.64.6
Inheritance Test23.513.214.94.219.28.7
Indexing Test25.53.021.55.123.54.0
Graph (Binary Tree) Test14.91.114.03.414.52.3
Multithreading Test28.18.914.29.521.19.1
All Tests21.98.014.93.818.46.0

The results above show that in general EclipseLink with H2 embedded is much more efficient than DataNucleus with PostgreSQL server in performing JPA database operations. Comparing the normalized speed of DataNucleus with PostgreSQL database server (6.0) to the normalized speed of EclipseLink with H2 embedded database (18.4) reveals that in these tests, EclipseLink with H2 embedded is 3.1 times faster than DataNucleus with PostgreSQL server.

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

Other Head to Head DBMS/JPA Comparisons