From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: machine-readable explain output |
Date: | 2009-06-16 11:19:18 |
Message-ID: | 4A377FB6.7040601@anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 06/12/2009 07:15 AM, Robert Haas wrote:
> If you don't like the syntax, please argue about that on the "generic
> explain options v2" thread. Let's try to use this thread to discuss
> the output format, about which I spent a good deal of time agonizing.
I spent some time playing around with the explain output with various
queries. Beside the already raised mild dislike (from Peter Eisentraut I
think) of Upper-Case "-" seperated tag-names I found mainly one gripe:
<Startup-Cost>1710.98</Startup-Cost>
<Total-Cost>1710.98</Total-Cost>
<Plan-Rows>72398</Plan-Rows>
<Plan-Width>4</Plan-Width>
<Actual-Startup-Time>136.595</Actual-Startup-Time>
<Actual-Total-Time>136.595</Actual-Total-Time>
<Actual-Rows>72398</Actual-Rows>
<Actual-Loops>1</Actual-Loops>
This is a bit inconsistent. i.e. for the row estimate you use
<Plan-Rows/> and for <Startup-Cost/> you dont use the "Plan-" Prefix.
While for the 'analyze' generated variables you use the 'Actual-' prefix
consistently.
One approach would be to have two nodes like:
<Plan-Estimates>
<Startup-Cost>...</Startup-Cost>
...
</Plan-Estimates>
<Execution-Cost>
<Startup-Cost>...</Startup-Cost>
...
</Execution-Cost>
This would probably make it easier to write a future proof parser and it
also seems semantically sensible.
As an aside issue it would perhaps be nice (thinking of an
index-suggestion tool) to make it possible for having seperate estimates
on <Index-Cond> an <Filter> - In order not to change the format later
that perhaps has to be considered here.
Perhaps the current structure + some additional tags is also the best
here - I just noticed it being a potential issue.
Andres
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2009-06-16 11:50:29 | Synch Rep: communication between backends and walsender |
Previous Message | Heikki Linnakangas | 2009-06-16 11:18:47 | Re: Partial vacuum versus pg_class.reltuples |