Compare with

Comparison of EclipseLink with PostgreSQL server vs EclipseLink 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
 EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
Basic Person Test7.35.54.23.75.84.6
Element Collection Test3.13.01.91.72.52.4
Inheritance Test6.95.35.03.55.94.4
Indexing Test10.06.96.84.68.45.8
Graph (Binary Tree) Test3.52.03.31.93.41.9
Multithreading Test31.89.314.54.123.16.7
All Tests10.45.36.03.28.24.3

The results above show that in general EclipseLink with PostgreSQL server is more efficient than EclipseLink 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 EclipseLink with Derby embedded database (4.1) to the normalized speed of EclipseLink with PostgreSQL database server (14.5) reveals that in that case, EclipseLink with PostgreSQL server is 3.5 times faster than EclipseLink with Derby embedded.

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

Retrieval Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
Basic Person Test6.816.417.258.712.037.5
Element Collection Test0.0267.50.02013.30.02310.4
Inheritance Test6.017.119.758.912.938.0
Indexing Test5.614.219.567.412.640.8
Graph (Binary Tree) Test0.472.80.615.70.544.2
Multithreading Test13.528.027.848.720.638.4
All Tests5.414.314.142.19.828.2

The results above show that in general EclipseLink with Derby embedded is more efficient than EclipseLink with PostgreSQL server in retrieving JPA entity objects from the database. Comparing the normalized speed of EclipseLink with PostgreSQL database server (9.8) to the normalized speed of EclipseLink with Derby embedded database (28.2) reveals that in these tests, EclipseLink with Derby embedded is 2.9 times faster than EclipseLink with PostgreSQL server.

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 EclipseLink with Derby embedded database (13.3) reveals that in that case, EclipseLink with Derby embedded is 665 times faster 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
EclipseLink
Derby embedded
EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
Basic Person Test55.553.47.813.831.633.6
Element Collection Test15.437.90.0284.47.721.2
Inheritance Test54.937.411.515.033.226.2
Indexing Test0.0777.610.049.35.128.4
Multithreading Test55.341.212.06.133.723.6
All Tests36.235.58.317.722.326.6

The results above show that in general EclipseLink with Derby embedded is slightly more efficient than EclipseLink with PostgreSQL server in executing the tested JPA queries.

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.028) to the normalized speed of EclipseLink with Derby embedded database (4.4) reveals that in that case, EclipseLink with Derby embedded is 157 times faster than EclipseLink with PostgreSQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
Basic Person Test6.26.44.16.75.16.5
Element Collection Test0.0805.40.0286.20.0545.8
Inheritance Test6.46.56.19.26.27.8
Indexing Test6.57.37.011.16.89.2
Graph (Binary Tree) Test0.902.80.501.70.702.2
Multithreading Test36.021.39.15.022.513.1
All Tests9.38.34.56.66.97.5

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

A huge performance gap has been detected 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 EclipseLink with Derby embedded database (6.2) reveals that in that case, EclipseLink with Derby embedded is 221 times faster than EclipseLink with PostgreSQL server.

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

Transaction Size =>Few EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
Basic Person Test5.74.65.74.75.74.6
Element Collection Test0.0252.5stopped1.40.0121.9
Inheritance Test5.53.95.44.55.44.2
Indexing Test10.46.210.03.810.25.0
Graph (Binary Tree) Test0.0161.10.0131.00.0151.1
Multithreading Test26.36.216.85.821.66.0
All Tests8.04.16.33.57.23.8

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

A large performance gap has been detected when using multithreading with small transaction size. Comparing the normalized speed of EclipseLink with Derby embedded database (6.2) to the normalized speed of EclipseLink with PostgreSQL database server (26.3) reveals that in that case, EclipseLink with PostgreSQL server is 4.2 times faster than EclipseLink with Derby embedded.

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

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

Transaction/Retrieval SizeFew EntitiesMany EntitiesAverage Score
 EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
EclipseLink
PostgreSQL server
EclipseLink
Derby embedded
Basic Person Test16.317.37.817.512.117.4
Element Collection Test3.711.30.405.42.18.3
Inheritance Test15.914.09.518.212.716.1
Indexing Test6.58.410.727.28.617.8
Graph (Binary Tree) Test1.22.21.12.61.22.4
Multithreading Test32.621.216.013.924.317.6
All Tests13.112.77.814.510.513.6

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

A huge performance gap has been detected 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 EclipseLink with Derby embedded database (5.4) reveals that in that case, EclipseLink with Derby embedded is 13.5 times faster than EclipseLink with PostgreSQL server.

Other Head to Head DBMS/JPA Comparisons