Add index on vulnerability_feedback (finding_uuid)
Why are we doing this work
The following discussion from !82143 (merged) should be addressed:
-
@dfrazao-gitlab started a discussion: (+4 comments) query:
load_feedback
I can see two red flags in this query/query+plan. We are using a sequential scan and the
uuid
data type is different.vulnerability_occurrences
uses varcharvulnerability_feedback
uses uuid.
Relevant links
Non-functional requirements
-
Performance: Show query timing
Implementation plan
-
database Add index to vulnerability_feedback.finding_uuid
Verification steps
- Run the following query plan:
SELECT
*
FROM
vulnerability_feedback
WHERE
finding_uuid = (
SELECT
finding_uuid
FROM
vulnerability_feedback
LIMIT 1)
- There should be an index call in the plan
Edited by Jonathan Schafer