On 6/13/07, Gregory Stark <[EMAIL PROTECTED]> 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

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


How would I, with XML output, do something like:

SELECT distinct node.relation
  FROM plan_table
 WHERE node.expected_rows < node.actual_rows*2;


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,

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not

Reply via email to