Re: EXPLAIN BUFFERS

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Euler Taveira de Oliveira <euler(at)timbira(dot)com>
Cc: Takahiro Itagaki <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Greg Smith <greg(at)2ndquadrant(dot)com>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: EXPLAIN BUFFERS
Date: 2009-12-10 14:19:26
Message-ID: 603c8f070912100619r271a6618wd934d077a365dc87@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 10, 2009 at 9:03 AM, Euler Taveira de Oliveira
<euler(at)timbira(dot)com> wrote:
> Robert Haas escreveu:
>> I'm not sure whether this is a good idea or not.  Let me read the
>> patch.  I'm not sure an EXPLAIN option is really an adequate
>> substitute for log_statement_stats - the latter will let you get stats
>> for all of your queries automatically, I believe, and might still be
>> useful as a quick and dirty tool.
>>
> Why? If you want this information for all of your queries, you can always set
> auto_explain.log_min_duration to 0. But if you're suggesting that we should
> maintain log_statement_stats (that was not I understand from Tom's email [1]),
> it's not that difficult to a change ShowBufferUsage().

Mmm, OK, if Tom thinks we should rip it out, I'm not going to second-guess him.

>> I still think this is a bad format.  Instead of putting "(" and ")"
>> around each phrase, can't we just separate them with a "," or ";"?
>>
> We already use ( and ) to group things. I don't remember us using , or ; in
> any output node. The suggested output is intuitive and similar to other nodes
> patterns.

It isn't. In the other cases where we output multiple distinct values
on the same output row - like the sort instrumentation when ANALYZE is
turned on - they are separated with copious amounts of whitespace.
Costs are an exception, but those aren't done the same way as this
either.

The only reason anyone is even thinking that they need parentheses
here is because they're trying to put three separate groups of
buffer-related statistics - a total of 8 values - on the same output
line. If this were split up over three output lines, no one would
even be suggesting parentheses. Maybe that's a saner way to go. If
not, fine, but I don't believe for a minute that the suggested format
is either correct or parallel to what has been done elsewhere.

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-12-10 14:22:10 Re: explain output infelicity in psql
Previous Message Euler Taveira de Oliveira 2009-12-10 14:03:30 Re: EXPLAIN BUFFERS