3 ms·
s/sensible/sensitive/ Would this be a place where a plan hint would help? It seems like having to re-analyze would mean that this is just a matter of time befo
by hobs 6y ago
s/sensible/sensitive/
Would this be a place where a plan hint would help? It seems like having to re-analyze would mean that this is just a matter of time before it becomes problematic again.
- ahachete 6y ago> s/sensible/sensitive/ Thanks :) > Would this be a place where a plan hint would help? It is one option to consider (I wrote about it last week: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/3875#note_528191706 https://gitlab.com/gitlab-com/gl-infra/production/-/issues/3...), but it is not an ideal solution, for several reasons. Re-analyze is not the solution either, but as a short-term measure, cron-ed ANALYZEs will be run. Longer term, apart from refactoring some queries which are quite prone to trigger this plan behavior, statistics gathering process is going to be fully reviewed.
- hobs 6y agoGotcha, that makes sense to me - refactoring queries which wanna flip would be my choice as well, just thinking that if the analyze fixes plans its (in my experience) "well we could have just used this plan anyway" - both of them are short term fixes for sure.