From: | Thomas Hallgren <thomas(at)tada(dot)se> |
---|---|
To: | Richard Huxton <dev(at)archonet(dot)com> |
Cc: | "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Satoshi Nagayasu <nagayasus(at)nttdata(dot)co(dot)jp>, Akshat Nair <akshat(dot)nair(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Get explain output of postgresql in Tables |
Date: | 2006-04-12 14:53:20 |
Message-ID: | 443D1460.2080000@tada.se |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Richard Huxton wrote:
> Tom Lane wrote:
>>
>> I dislike the thought of encouraging people to post stuff in a
>> not-easily-readable format. They won't do it anyway, if it's not
>> default; look how we still can't get people to send EXPLAIN ANALYZE
>> output the first time.
>
> It certainly needs to be one format for both purposes.
>
>> One idea that comes to mind is to work up some trivial little script
>> that undoes the more common forms of cut-and-paste damage.
>>
>> I wonder if it would help much just to change EXPLAIN to indent with
>> something other than spaces? Maybe instead of
>>
>> Nested Loop (cost=1.06..40.43 rows=5 width=244)
>> Join Filter: (public.tenk1.unique2 = int4_tbl.f1)
>> -> HashAggregate (cost=1.06..1.11 rows=5 width=4)
>>
>> print
>>
>> Nested Loop (cost=1.06..40.43 rows=5 width=244)
>> --Join Filter: (public.tenk1.unique2 = int4_tbl.f1)
>> ----> HashAggregate (cost=1.06..1.11 rows=5 width=4)
>>
>> Not sure what would look nice, but this would at least remove the hazard
>> from stuff that thinks whitespace isn't significant.
>
> That's the sort of thing I was thinking of, or even something like:
> 1> Nested Loop ...
> 1.1> Join Filter...
> 1.1.1> HashAggregate...
> 1.2> etc
>
Why not go all the way. Here's the above using Satoshi's suggestion:
<NestedLoop cost="1.06..40.43" rows="5" width="244">
<JoinFilter publicTenk1Unique2="int4_tbl.f1">
<HashAggregate cost="1.06..1.11" rows="5" width="4"/>
</JoinFilter>
</NestedLoop>
Easy to copy/paste and whitespace doesn't matter. Easy to read (well, to some at least) and
can be even easier if you have access to an XML viewer.
Regards,
Thomas Hallgren
From | Date | Subject | |
---|---|---|---|
Next Message | Jim C. Nasby | 2006-04-12 15:29:53 | Re: Get explain output of postgresql in Tables |
Previous Message | Bort, Paul | 2006-04-12 14:45:29 | Re: plpgsql by default |