Re: EXPLAIN BUFFERS

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Greg Smith <greg(at)2ndquadrant(dot)com>
Cc: Itagaki Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Euler Taveira de Oliveira <euler(at)timbira(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-08 04:16:19
Message-ID: 603c8f070912072016v15d8e146w30bea7ba92714d7b@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 7, 2009 at 11:09 PM, Greg Smith <greg(at)2ndquadrant(dot)com> wrote:
> Robert Haas wrote:
>
> On Mon, Dec 7, 2009 at 9:58 PM, Itagaki Takahiro
> <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> wrote:
>
>
> Obviously I should not hide any information only in the text format.
> The new output will be: (in one line)
>  Shared Blocks: (hit=2 read=1641 written=0) Local Blocks: (hit=0 read=0
> written=0) Temp Blocks: (read=1443 written=1443)
>
>
> Hmm, that's a little awkward. I think we could drop some of the
> punctuation.
>
> Shared Blocks: hit 2 read 1641 wrote 0, Local Blocks: hit 0 read 0
> wrote 0, Temp Blocks: read 1443 wrote 1443
>
>
> Having written more things to parse log files that should have been saved in
> a better format after the fact than I'd like, I'd say that replacing the "="
> signs used as a delimiter with a space is a step backwards.  That doesn't
> save any space anyway, and drifts too far from what one gets out of regular
> EXPLAIN I think.
>
> I was perfectly happy with proposed text format as being a reasonable
> trade-off between *possible* to parse if all you have is the text format,
> while still being readable.  If you want to compress horizontally, get rid
> of "Blocks" after the first usage is the first thing to do:
>
> (1) Blocks Shared: (hit=2 read=1641 written=0) Local: (hit=0 read=0
> written=0) Temp: (read=1443 written=1443)
>
> That's already at about the same length as what you suggested at 105
> characters, without losing any useful formatting.
>
> If further compression is required, you could just remove all the
> parentheses:
>
> (2) Blocks Shared:hit=2 read=1641 written=0 Local:hit=0 read=0 written=0
> Temp:read=1443 written=1443
>
> I don't really like this though.  Instead you could abbreviate the rest of
> the repeated text and reduce the number of spaces:
>
> (3) Blocks Shared:(hit=2 read=1641 written=0) Local:(h=0 r=0 w=0)
> Temp:(r=1443 w=1443)
>
> And now we're at the smallest result yet without any real loss in
> readability--I'd argue it's faster to read in fact.  This has a good balance
> of fitting on a reasonably wide console (the above is down to 82
> characters), still being readable to anyone, and being possible to machine
> parse in a pinch if all you have are text logs around (split on : then =).
> It might be too compressed down for some tastes though.

I could live with the equals signs, but the use of parentheses seems
weird and inconsistent with normal english usage (which permits
parentheses as a means of making parenthetical comments). (You can
also put an entire sentence in parentheses.) But you can't: (do
this).

...Robert

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Takahiro Itagaki 2009-12-08 04:46:56 Re: EXPLAIN BUFFERS
Previous Message Greg Smith 2009-12-08 04:09:18 Re: EXPLAIN BUFFERS