Add index to improve speed of vulnerability_reads
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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Michał Zając