DependencyTrack / DependencyTrack/dependency-track

high load due to massive updates on DEPENDENCYMETRICS and VULNERABILITY

Open
#4,036 0 comments 0 reactions 0 assignees View on GitHub
enhancement p2 performance
Dominant language
Java
Stars
4.2k
Forks
811
Avg merge
8h 39m
Merged PRs (30d)
237

Description

### Current Behavior

dependencymetrics receives updates one on each line per hour statistically:
`UPDATE "DEPENDENCYMETRICS" SET "LAST_OCCURRENCE"=$1 WHERE "ID"=$2

select relname,n_tup_ins,n_tup_upd,n_live_tup,autovacuum_count from pg_stat_user_tables order by n_tup_upd/n_live_tup desc;
-[ RECORD 1 ]----+-----------------------------------
relname | DEPENDENCYMETRICS
n_tup_ins | 186982
n_tup_upd | 632665605
n_live_tup | 331487
autovacuum_count | 11352`

An impressing autovacuum_count.
Please reduce the amount of updates. The Database is a persistence layer and not a logfile.

![image](https://github.com/user-attachments/assets/81875320-637a-4a59-82be-c28de15610f8)

Thousands of single-column updates on VULNERABILITY with the same amount on different columns.
Please consolidate them to multi-column updates

### Proposed Behavior

Please reduce the amount of updates. The Database is a persistence layer and not a logfile.
Thousands of single-column updates on VULNERABILITY with the same amount on different columns.
Please consolidate them to multi-column updates

### Checklist

- [X] I have read and understand the [contributing guidelines](https://github.com/DependencyTrack/dependency-track/blob/master/CONTRIBUTING.md#filing-issues)
- [X] I have checked the [existing issues](https://github.com/DependencyTrack/dependency-track/issues) for whether this enhancement was already requested

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.