Optimize query for issue neighbors
What does this MR do and why?
This fixes slow queries when moving issues on an issue board.
This uses the technique / module described in https://docs.gitlab.com/ee/development/database/efficient_in_operator_queries.html
- Old query: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/7491/commands/26655
- New query: https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/7491/commands/26652
Related to #345921 (closed)
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 Heinrich Lee Yu