Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-10 Thread Greg Stark
On Wed, Feb 10, 2010 at 3:59 AM, Robert Haas robertmh...@gmail.com wrote: Yes.  We could add every bell and whistle imaginable to the text format and it still would not begin to approach the verbosity of the machine-readable formats.  Have you looked at them on a complex plan? They are really,

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-10 Thread Robert Haas
On Wed, Feb 10, 2010 at 5:39 AM, Greg Stark st...@mit.edu wrote: On Wed, Feb 10, 2010 at 3:59 AM, Robert Haas robertmh...@gmail.com wrote: Yes.  We could add every bell and whistle imaginable to the text format and it still would not begin to approach the verbosity of the machine-readable

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-10 Thread Greg Stark
On Wed, Feb 10, 2010 at 1:26 PM, Robert Haas robertmh...@gmail.com wrote: For example, EXPLAIN (VERBOSE, FORMAT JSON) is often ridiculously wide because each output list is printed on a single line. Perhaps this is just a terminology difference but it seems ridiculously *narrow* to me:

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-10 Thread Robert Haas
On Wed, Feb 10, 2010 at 9:09 AM, Greg Stark st...@mit.edu wrote: Perhaps this is just a terminology difference but it seems ridiculously *narrow* to me: Try select * from pg_class. Or as I said at the time... nobody liked anything about the patch except that they didn't have to write it. I

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-10 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: I sort of assumed we might get some feedback from pgadmin or other tool writers between the time this was committed six months ago and now, but I haven't seen a single message from anyone who has actually tried to write a tool. As you imply, I think

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-10 Thread Robert Haas
On Wed, Feb 10, 2010 at 9:46 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: I sort of assumed we might get some feedback from pgadmin or other tool writers between the time this was committed six months ago and now, but I haven't seen a single message from

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-10 Thread Dave Page
On Wed, Feb 10, 2010 at 4:15 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Feb 10, 2010 at 9:46 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: I sort of assumed we might get some feedback from pgadmin or other tool writers between the time this was

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-10 Thread Alvaro Herrera
Robert Haas escribió: On Wed, Feb 10, 2010 at 9:46 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: I sort of assumed we might get some feedback from pgadmin or other tool writers between the time this was committed six months ago and now, but I haven't

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-10 Thread Tom Lane
Dave Page dp...@pgadmin.org writes: On Wed, Feb 10, 2010 at 4:15 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Feb 10, 2010 at 9:46 AM, Tom Lane t...@sss.pgh.pa.us wrote: We can still hope that some feedback comes in during beta. I'm not opposed to that in principal, but in practice

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-10 Thread Dave Page
On Wed, Feb 10, 2010 at 4:50 PM, Tom Lane t...@sss.pgh.pa.us wrote: Dave Page dp...@pgadmin.org writes: On Wed, Feb 10, 2010 at 4:15 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Feb 10, 2010 at 9:46 AM, Tom Lane t...@sss.pgh.pa.us wrote: We can still hope that some feedback comes in

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-10 Thread Alvaro Herrera
Tom Lane escribió: Dave Page dp...@pgadmin.org writes: On Wed, Feb 10, 2010 at 4:15 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Feb 10, 2010 at 9:46 AM, Tom Lane t...@sss.pgh.pa.us wrote: We can still hope that some feedback comes in during beta. I'm not opposed to that in

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-10 Thread Robert Haas
On Wed, Feb 10, 2010 at 11:58 AM, Alvaro Herrera alvhe...@commandprompt.com wrote: Tom Lane escribió: Dave Page dp...@pgadmin.org writes: On Wed, Feb 10, 2010 at 4:15 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Feb 10, 2010 at 9:46 AM, Tom Lane t...@sss.pgh.pa.us wrote: We can

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-10 Thread Alvaro Herrera
Robert Haas escribió: On Wed, Feb 10, 2010 at 11:58 AM, Alvaro Herrera alvhe...@commandprompt.com wrote: Is Redhat's Visual Explain still alive?  And what about Tom Raney's stuff? The core of Tom Raney's work was not so much the EXPLAIN format per se (which is really mooted by the changes

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-10 Thread Tom Lane
Alvaro Herrera alvhe...@commandprompt.com writes: Tom Lane escribió: ... It would be really nice if we could get some feedback on the non-text formats *before* they're set in stone. Is Redhat's Visual Explain still alive? And what about Tom Raney's stuff? Visual Explain is dead as far as

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-10 Thread Robert Haas
On Wed, Feb 10, 2010 at 12:08 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Robert Haas escribió: On Wed, Feb 10, 2010 at 11:58 AM, Alvaro Herrera alvhe...@commandprompt.com wrote: Is Redhat's Visual Explain still alive?  And what about Tom Raney's stuff? The core of Tom Raney's

[HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Greg Stark
I was recently experimenting with explain analyze and I realized there are two things arguably wrong with the Buffers output in explain analyze: Firstly, it's printing out a number of buffers. We spent a lot of effort making all GUC variables use units of memory like kB and MB so the user should

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Josh Berkus
On 2/9/10 11:50 AM, Greg Stark wrote: Secondly, I think it's printing the total buffer usage for that node across the whole query -- not the average per iteration. I agree that the average is probably more confusing but it's what we do for every other stat. Do we want to be consistent? Call

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Robert Haas
On Tue, Feb 9, 2010 at 3:26 PM, Josh Berkus j...@agliodbs.com wrote: On 2/9/10 11:50 AM, Greg Stark wrote: Secondly, I think it's printing the total buffer usage for that node across the whole query -- not the average per iteration. I agree that the average is probably more confusing but it's

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Tom Lane
Greg Stark st...@mit.edu writes: I already have a patch to do this but it's a bit grotty -- do we want to have a generic format string in snprintf in case we need it somewhere else other than explain.c? No. Custom format specifiers that take arguments will confuse the heck out of gcc's

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Feb 9, 2010 at 3:26 PM, Josh Berkus j...@agliodbs.com wrote: I'd prefer to have the average; it's very confusing to have an explain row which has the cost per iteration, but the buffer usage per node. The cost per iteration thing is IMO one of

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Robert Haas
On Tue, Feb 9, 2010 at 5:07 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Feb 9, 2010 at 3:26 PM, Josh Berkus j...@agliodbs.com wrote: I'd prefer to have the average; it's very confusing to have an explain row which has the cost per iteration, but the

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Feb 9, 2010 at 5:07 PM, Tom Lane t...@sss.pgh.pa.us wrote: Well, if you want to put forward a proposal to get rid of that approach entirely, go ahead.  But it doesn't seem like a good idea to me for EXPLAIN to print some numbers according to

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Robert Haas
On Tue, Feb 9, 2010 at 5:41 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Feb 9, 2010 at 5:07 PM, Tom Lane t...@sss.pgh.pa.us wrote: Well, if you want to put forward a proposal to get rid of that approach entirely, go ahead.  But it doesn't seem like

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Feb 9, 2010 at 5:41 PM, Tom Lane t...@sss.pgh.pa.us wrote: A more important point is that it would be a nontrivial change, both as to code and documentation, and it's too late for such in 9.0.  So what we ought to be confining the discussion to

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Greg Stark
On Tue, Feb 9, 2010 at 10:42 PM, Robert Haas robertmh...@gmail.com wrote: A more important point is that it would be a nontrivial change, both as to code and documentation, and it's too late for such in 9.0.  So what we ought to be confining the discussion to right now is what 9.0 should print

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Robert Haas
On Tue, Feb 9, 2010 at 6:33 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Feb 9, 2010 at 5:41 PM, Tom Lane t...@sss.pgh.pa.us wrote: A more important point is that it would be a nontrivial change, both as to code and documentation, and it's too late

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Feb 9, 2010 at 6:33 PM, Tom Lane t...@sss.pgh.pa.us wrote: Not in the least.  Fixing EXPLAIN to consistently print totals would involve changes in (at least) the treatment of estimated costs, and very possibly some changes in the

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Greg Stark
On Wed, Feb 10, 2010 at 12:32 AM, Tom Lane t...@sss.pgh.pa.us wrote: The reason that EXPLAIN prints things the way it does is so that actual costs/times are comparable to estimated costs. Oh, that was a thought I had along the way but forgot to mention in my email: since the buffer usage isn't

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Tom Lane
Greg Stark st...@mit.edu writes: On Wed, Feb 10, 2010 at 12:32 AM, Tom Lane t...@sss.pgh.pa.us wrote: The reason that EXPLAIN prints things the way it does is so that actual costs/times are comparable to estimated costs. Oh, that was a thought I had along the way but forgot to mention in my

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Robert Haas
On Tue, Feb 9, 2010 at 8:18 PM, Tom Lane t...@sss.pgh.pa.us wrote: Perhaps instead of looking to change the actual times we should look at a way to include total time spent in each node. You can already get that by multiplying the displayed total time by the number of loops.  Robert does have

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Feb 9, 2010 at 8:18 PM, Tom Lane t...@sss.pgh.pa.us wrote: ... I wouldn't object to adding a total time field to the machine-readable formats. One possibility we discussed previously is to add some decimal places to the relevant values when

Re: [HACKERS] Some belated patch review for Buffers explain analyze patch

2010-02-09 Thread Robert Haas
On Tue, Feb 9, 2010 at 10:51 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Tue, Feb 9, 2010 at 8:18 PM, Tom Lane t...@sss.pgh.pa.us wrote: ... I wouldn't object to adding a total time field to the machine-readable formats. One possibility we discussed