Re: Plan targetlists in EXPLAIN output - Mailing list pgsql-hackers

From Gregory Stark
Subject Re: Plan targetlists in EXPLAIN output
Date
Msg-id 874pa0crww.fsf@oxford.xeocode.com
Whole thread Raw
In response to Plan targetlists in EXPLAIN output  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Plan targetlists in EXPLAIN output  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
"Tom Lane" <tgl@sss.pgh.pa.us> writes:

> For debugging the planner work I'm about to do, I'm expecting it will be
> useful to be able to get EXPLAIN to print the targetlist of each plan
> node, not just the quals (conditions) as it's historically done.  My
> first instinct is just to stick in the code under a debugging #ifdef,
> but I wonder if anyone wants to argue for making it more easily
> available?

Yes please.

> I think it'd be a mistake to turn it on by default, because it'd add a
> line for every plan node, which'd be an awful lot of bloat in output
> that's hard enough to read already.  And experience has shown that
> 99.99% of the time people don't need the info.  Still, there's that
> other 0.01%.
>
> I'm tempted to propose redefining the currently-nearly-useless
> EXPLAIN VERBOSE option as doing this.

EXPLAIN VERBOSE is indeed ridiculous. The only downside is that people
following modern instructions on old installs will be sad. But I'm fine with
that.

IMHO You could also move "width" to VERBOSE while you're at it. In fact you'll
probably want width in precisely the same cases where you want the target
list.

I think down the road we'll have a few different independent data sets you can
get out of explain or at least explain analyze. I want to get i/o stats in
there which I think you'll want to turn on and off as a group, for example.
But perhaps by the time we do that someone will have done XML explain and
it'll be irrelevant. I can't think of any nice syntax to do that offhand
anyways. So +1 for just redefining VERBOSE.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services!


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Lessons from commit fest
Next
From: Bruce Momjian
Date:
Subject: Re: Lessons from commit fest