Investigate disabling PGSQL execution methods as a performance improvement for IssuableFinder
Problem
Issues search with complex sorts isn't performant and need improvement.
Context
In #204720 (closed) it was investigated how to improve issue searches when using complex sorts. pg_hint_plan
extension was proposed as a viable solution. That was investigated and implemented. However, this solution was pushed back (and another example) as there are more reliable solutions to improve Postgres performance.
So follow-up issues were created to investigate alternative approaches. This one is particularly related to Disable execution methods. It's also possible to change the planner cost constants to help Postgresql figure out the best plan.
Solution
It's been suggested that setting different execution methods inside a transaction might allow us to improve the performance of certain hard-to-optimize queries.
Postgres has different planer method configurations and they are needed to be investigated.
Implementation plan
-
Investigated the use of different execution methods to improve performance of IssuableFinder#by_search -
If successful, created additional issue(s) with implementation plan. -
If unsuccessful, relay findings here.