At 10:52 AM 7/15/01 +1000, Martijn van Oosterhout wrote:
>
>Anyway, do you think it's a path worth pursuing? The reason I'm doing it is
>because I know queries where the planner thinks the cost is several million
>and it takes 3 seconds, and also where the cost is a fraction of that but it
>takes minutes. But the queries are complex so it's hard to see where the
>time goes. So, this lets me see.
I think a feature like this is very useful. And worth pursuing if it
doesn't affect too many things.
However I'm wondering what happens when a single query is fast, but you are
doing thousands of it in actual use? Would the time resolution be
sufficient in that case to point out the critical parts? This is just a
very minor consideration tho.
Another thing - if it actually runs the query, things might change in the
database, so you might have to use a different name for the feature instead
of EXPLAIN. If not people could screw things up without knowing it. Doing a
rollback might help, but normally when users are already in a transaction
they might not expect things like EXPLAIN to rollback the transaction for
them.
Cheerio,
Link.