Re: Parsing output of EXPLAIN command in PostgreSQL

Поиск
Список
Период
Сортировка
От Andreas Karlsson
Тема Re: Parsing output of EXPLAIN command in PostgreSQL
Дата
Msg-id 4EBC534A.8000000@proxel.se
обсуждение исходный текст
Ответ на Parsing output of EXPLAIN command in PostgreSQL  (Αναστάσιος Αρβανίτης <tasosarvanitis@yahoo.gr>)
Ответы Re: Parsing output of EXPLAIN command in PostgreSQL  (Andreas Karlsson <andreas@proxel.se>)
Список pgsql-hackers
On 2011-11-10 17:23, Αναστάσιος Αρβανίτης wrote:
> Also another option I am considering is to use EXPLAIN [query] FORMAT XML which is available in PostgreSQL 9.1.
However,in that case it
 
> would better to have the XML Schema of the generated plans available.
>
> Is there any other solution I am not aware of?

Hi,

I recommend using the XML, JSON or YAML version of the plan, whichever 
is easiest in your programming language to parse. I do not think anyone 
has written a formal schema yet for the XML but it still should be much 
easier to parse than rolling your own parser for the human readable format.

But if you insist on parsing the human readable format, e.g. to support 
versions before 9.1, I recommend that you take a look at 
http://explain.depesz.com/ which supports parsing text plans in addition 
to XML and JSON. The site is open source and written in Perl.

The source code can be found at:

https://github.com/depesz/Pg--Explain

Best regards,
Andreas

-- 
Andreas Karlsson


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Disable OpenSSL compression
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Disable OpenSSL compression