Re: explain root element for auto-explain

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: explain root element for auto-explain
Date: 2009-08-20 13:30:28
Message-ID: 4A8D4FF4.30108@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan wrote:
> Bruce Momjian wrote:
>> Are we going to publish an XML DTD for EXPLAIN, or have we already?
>
> Not a DTD, but I am working on an XML Schema (DTDs are a bit yesterday).
>
>

Here is a RelaxNG spec which people might find a bit easier to read. It
has been autocreated by a little tool called trang, that I used on a
very large body of explain output that I produced by mangling the
regression tests (and, incidentally, crashing the server in the result -
I still have to chase that up).

I have a couple of questions, however. First, in that long list of
alternatives for a Plan node, can any of them occur more than once?
Second, we are using Item as a child of both Output and Sort-Key nodes.
Are they really describing the same thing? And in any case, Item is a
wonderfully non-informative name, as is Output, for that matter.

BTW - I know this requires tweaking - those xsd:NCName values will
probably just become text, for example.

cheers

andrew

default namespace = "http://www.postgresql.org/2009/explain"

start =
element explain {
element Query {
Plan,
element Triggers { empty },
element Total-Runtime { xsd:decimal }
}
}
Plan =
element Plan {
(element Actual-Loops { xsd:integer }
| element Actual-Rows { xsd:integer }
| element Actual-Startup-Time { xsd:decimal }
| element Actual-Total-Time { xsd:decimal }
| element Alias { text }
| element Filter { text }
| element Function-Name { xsd:NCName }
| element Hash-Cond { text }
| element Index-Name { xsd:NCName }
| element Join-Filter { text }
| element Join-Type { xsd:NCName }
| element Merge-Cond { text }
| element Node-Type { text }
| element One-Time-Filter { text }
| element Output { Item+ }
| element Parent-Relationship { xsd:NCName }
| element Plan-Rows { xsd:integer }
| element Plan-Width { xsd:integer }
| element Plans { Plan* }
| element Recheck-Cond { text }
| element Relation-Name { xsd:NCName }
| element Scan-Direction { xsd:NCName }
| element Schema { xsd:NCName }
| element Sort-Key { Item+ }
| element Sort-Method { text }
| element Sort-Space-Type { xsd:NCName }
| element Sort-Space-Used { xsd:integer }
| element Startup-Cost { xsd:decimal }
| element Strategy { xsd:NCName }
| element Subplan-Name { text }
| element Total-Cost { xsd:decimal })*,
element Index-Cond { text }?
}
Item = element Item { text }

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-08-20 14:22:38 Re: explain root element for auto-explain
Previous Message Robert Haas 2009-08-20 13:27:58 Re: hot standby - merged up to CVS HEAD