Skip to content

Add index to improve speed of vulnerability_reads

Michał Zając requested to merge 355703-add-index-to-vulnerability_reads into master

What does this MR do and why?

Add index on (project_id, state, report_type, severity, vulnerability_id) to speed up commonly executed queries.

Related to #355703 (closed)

Database review

Before

https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/9197/commands/32619

After

https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/9202/commands/32656

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Michał Zając

Merge request reports

Loading