Re: EXPLAIN omits schema? - Mailing list pgsql-hackers

From Nikolay Samokhvalov
Subject Re: EXPLAIN omits schema?
Date
Msg-id e431ff4c0706132224k456d7a5ewbcba2caf6a02bbcd@mail.gmail.com
Whole thread Raw
In response to Re: EXPLAIN omits schema?  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
On 6/13/07, Gregory Stark <stark@enterprisedb.com> wrote:
> I'm not a fan either so perhaps I'm biased, but this seems like a good example
> of where it would be an *awful* idea.
>
> Once you have an XML plan what can you do with it? All you can do is parse it
> into constituent bits and display it.

"...and display it" -- this, I suppose, covers the most frequent needs
(starting from displaying entire plans in some tools and finishing
with odd but useful examples like
http://archives.postgresql.org/pgsql-sql/2005-08/msg00046.php).

> You cant do any sort of comparison
> between plans, aggregate results, search for plans matching constraints, etc.

Wrong.

> How would I, with XML output, do something like:
>
> SELECT distinct node.relation
>   FROM plan_table
>  WHERE node.expected_rows < node.actual_rows*2;
>
> or
>
> SELECT node.type, average(node.ms/node.cost)
>   FROM plan_table
>  GROUP BY node.type;

XPath can help here. Now almost every language has XML with XPath
support. That's the point, that's why XML is suitable here -- it
simplifies application development (in this specific case ;-) ).

-- 
Best regards,
Nikolay


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Can autovac try to lock multiple tables at once?
Next
From: ITAGAKI Takahiro
Date:
Subject: Re: Load Distributed Checkpoints test results