by ganomi · 5y ago · 0 comments
If you're a small enough shop to consider it I highly recommend setting up something to automatically explain queries meeting some criteria on production or using some analysis stack (like new relic) to just capture all the query executions within certain time windows.
These tools all come with costs and should never just run continuously on production if you're getting no benefit from them, but the value can be quite significant.
But auto_explain solves only part of the task – you can see what happened, but cannot see the answers to "what if" questions. ("What if I used this index?")
[1] https://www.pgmustard.com/blog/auto-explain-overhead-with-ti...