Improve banned users filter for issues queries
What does this MR do and why?
Adds a +0 to the author_id clause to prevent a bad query plan flip.
Example queries
-
Project issue list
-
gitlab-org/gitlab(bad plan before) -
issue-reproduce/issue-reproduce(already using nested loop before)
-
-
Project issue exists
- Before: https://postgres.ai/console/gitlab/gitlab-production-main/sessions/38726/commands/119424
- After: https://postgres.ai/console/gitlab/gitlab-production-main/sessions/38726/commands/119425
- Group issue list (no difference, already using nested loop)
- Before: https://postgres.ai/console/gitlab/gitlab-production-main/sessions/38726/commands/119432
- After: https://postgres.ai/console/gitlab/gitlab-production-main/sessions/38726/commands/119434
References
Related to #394980 (closed)
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Heinrich Lee Yu