DependencyTrack / DependencyTrack/dependency-track
high load due to massive updates on DEPENDENCYMETRICS and VULNERABILITY
- 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.

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
Assessment
This issue has not been assessed yet.