3 ms·
I think the thing you're looking for (or at least the first part of it) is called auto_explain. http://www.postgresql.org/docs/current/static/auto-explain.html
by rosser 13y ago
I think the thing you're looking for (or at least the first part of it) is called auto_explain.
http://www.postgresql.org/docs/current/static/auto-explain.html http://www.postgresql.org/docs/current/static/auto-explain.h...
- lobster_johnson 13y agoNot really, that just does an explain automatically if the query exceeds a certain time. It may happen that the schema is optimal, in spite of the long execution time. What I am talking about would be "auto_improve", ie. where the planner has actually detected a subpar schema resulting in a slow query that can be improved by adding indexes.