|
|
|
|
|
by dagss
751 days ago
|
|
I am an MS SQL user and didn't touch postgres but can I assume analyse is a tool for displaying the chosen query plan for a query? If so it is in all DBs I would think but it is a bit too manual for my taste, still a big hurdle and opt-in...vs just writing code (including SQL code) and tests like normal and opt-out on getting errors if you get poor plans. But...probably some tooling could be made to do such analysis automatically and throw similar errors... Does statistics ever cause query plans to suddenly change on postgres? In MS SQL you would also need to pin the plan / disable statistics on tables... |
|
The problem with that is what is considered a "poor plan" largely comes down to the indexes used, and suitability of an index is totally dependent on how it is used in the application.
Who sees the error? The DBA? The application developer? What's the cutoff for "poor".
The stats of the query allow those that know/care to make decisions. That's the one size fits all, simple, tool.