On Sat, Jul 14, 2001 at 12:00:29PM -0400, Tom Lane wrote:
> Martijn van Oosterhout <kleptog@svana.org> writes:
> > Whether it's useful for anyone else is a question, but anyway, it makes an
> > explain type output like:
>
> So the assumption is that you'd actually *do* the query, then report
> back the plan tree plus measured statistics? Interesting thought.
> But how will you separate time for parent and child plan nodes?
> AFAICS, every plan node will show essentially the same elapsed time
> from start to finish, if you are going to just record wall-clock time
> at node startup and shutdown.
Yes, you actually do the query and the show what took how long. As for
seperating the parent and child nodes, is that really necessary? After all,
the estimates are how long it would take to execute the node and all
subnodes, so it shouldn't be too far off.
That said, certain nodes like Merge Join, which don't call the subnodes
sequentially would have the problem you mentioned, but that is solvable.
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.
--
Martijn van Oosterhout <kleptog@svana.org>
http://svana.org/kleptog/
> It would be nice if someone came up with a certification system that
> actually separated those who can barely regurgitate what they crammed over
> the last few weeks from those who command secret ninja networking powers.