Skip to content

Add index to improve speed of vulnerabilities

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

What does this MR do and why?

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

Related to #355703 (closed)

Database review

Before

https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/9258/commands/32750

After

https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/9265/commands/32767

MR acceptance checklist

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

Merge request reports

Loading