Compare with

Comparison of EclipseLink with PostgreSQL server vs DataNucleus with H2 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
 EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
Basic Person Test7.319.24.28.05.813.6
Element Collection Test3.16.61.92.82.54.7
Inheritance Test6.915.65.04.45.910.0
Indexing Test10.024.46.811.88.418.1
Graph (Binary Tree) Test3.59.23.36.23.47.7
Multithreading Test31.834.914.57.123.121.0
All Tests10.418.36.06.78.212.5

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
 EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
Basic Person Test6.813.217.213.512.013.3
Element Collection Test0.0266.40.0208.90.0237.7
Inheritance Test6.012.219.712.712.912.4
Indexing Test5.68.119.516.512.612.3
Graph (Binary Tree) Test0.4710.60.6120.90.5415.8
Multithreading Test13.513.327.89.920.611.6
All Tests5.410.614.113.79.812.2

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
 EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
Basic Person Test55.54.77.81.431.63.1
Element Collection Test15.45.00.0282.47.73.7
Inheritance Test54.93.811.51.633.22.7
Indexing Test0.0770.004110.01.85.10.91
Multithreading Test55.31.212.00.7933.71.0
All Tests36.23.08.31.622.32.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
 EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
Basic Person Test6.210.04.13.95.16.9
Element Collection Test0.0807.60.0283.90.0545.8
Inheritance Test6.49.46.14.46.26.9
Indexing Test6.510.67.05.96.88.2
Graph (Binary Tree) Test0.905.90.503.70.704.8
Multithreading Test36.0failed9.1failed22.5failed
All Tests9.38.74.54.46.96.5

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
 EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
Basic Person Test5.74.25.71.35.72.8
Element Collection Test0.0254.9stopped1.60.0123.2
Inheritance Test5.54.05.41.35.42.7
Indexing Test10.47.510.01.910.24.7
Graph (Binary Tree) Test0.0165.60.0134.10.0154.8
Multithreading Test26.3failed16.8failed21.6failed
All Tests8.05.26.32.07.23.6

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
 EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
EclipseLink
PostgreSQL server
DataNucleus
H2 embedded
Basic Person Test16.310.37.85.612.17.9
Element Collection Test3.76.10.403.92.15.0
Inheritance Test15.99.09.54.912.76.9
Indexing Test6.510.110.77.68.68.9
Graph (Binary Tree) Test1.27.81.18.71.28.3
Multithreading Test32.616.516.05.924.311.2
All Tests13.19.67.86.010.57.8

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