Re: [HACKERS] Plan targetlists in EXPLAIN output

2008-06-19 Thread Tom Raney
I have been working on a project (for GSOC) to retrieve planner/optimizer details. As part of the project, I need machine parsable output. So, I thought I would dust off a patch I found from last year that Germán Caamaño submitted. I didn't see any further activity there so I integrated it

[HACKERS] Plan targetlists in EXPLAIN output

2008-04-17 Thread Tom Lane
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

Re: [HACKERS] Plan targetlists in EXPLAIN output

2008-04-17 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] 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

Re: [HACKERS] Plan targetlists in EXPLAIN output

2008-04-17 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: EXPLAIN VERBOSE is indeed ridiculous. There are other ways to get that printout, too, if you really do need it. 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

Re: [HACKERS] Plan targetlists in EXPLAIN output

2008-04-17 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: I'm not convinced. The width is often useful to understand why the planner did something (eg, chose a hash plan or not). The exact contents of the targetlist are usually not nearly as interesting. I've never seen a single post on any of the lists where

Re: [HACKERS] Plan targetlists in EXPLAIN output

2008-04-17 Thread Tom Lane
Gregory Stark [EMAIL PROTECTED] writes: Or is it estimating the width based on the belief that only the thousand column is actually going to be emitted? Right. The width is used to estimate how much space would be needed for, eg, sorting or hashing the plan node's output. In any case where

Re: [HACKERS] Plan targetlists in EXPLAIN output

2008-04-17 Thread Simon Riggs
On Thu, 2008-04-17 at 12:34 -0400, Tom Lane wrote: I'm tempted to propose redefining the currently-nearly-useless EXPLAIN VERBOSE option as doing this. Yes please. Sounds like a good home for other useful things also. I'd like to have an EXPLAIN mode that displayed the plan without *any*

Re: [HACKERS] Plan targetlists in EXPLAIN output

2008-04-17 Thread Greg Smith
On Thu, 17 Apr 2008, Tom Lane wrote: 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. I've heard that some of the academic users of

Re: [HACKERS] Plan targetlists in EXPLAIN output

2008-04-17 Thread PFC
On Thu, 17 Apr 2008 20:42:49 +0200, Simon Riggs [EMAIL PROTECTED] wrote: On Thu, 2008-04-17 at 12:34 -0400, Tom Lane wrote: I'm tempted to propose redefining the currently-nearly-useless EXPLAIN VERBOSE option as doing this. Yes please. Sounds like a good home for other useful things

Re: [HACKERS] Plan targetlists in EXPLAIN output

2008-04-17 Thread Alvaro Herrera
PFC wrote: Plan = Tree Tree = XML If you want to propose a DTD I'm sure there would be many people interested. -- Alvaro Herrerahttp://www.CommandPrompt.com/ The PostgreSQL Company - Command Prompt, Inc. -- Sent via pgsql-hackers mailing list