how to find the order of joins from Explain command XML plan output in PostgreSQL

From: Rajmohan C <csrajmohan(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: how to find the order of joins from Explain command XML plan output in PostgreSQL
Date: 2014-07-09 17:46:38
Message-ID: CAHaqV0i03QqvZ_y07RVBEqzm-Ok4J=r9rn+GqCPz-F_+hR6JwQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"EXPLAIN (format XML) " command in PostgreSQL9.3.4 gives the plan chosen by
the optimizer in XML format. In my program, I have to extract certain data
about optimizer plan from this XML output. I am using *LibXML2* library for
parsing the XML. I had successfully extracted information about which
relations are involved and what joins are used by parsing the XML. But
I am *unable
to extract the* *order of joining the relations from the XML output*. I
conceptually understood that the reverse level order traversal of binary
tree representation of the XML plan will give correct ordering of joins
applied. But I could not figure out how do I get that from the XML? Does
libXML2 support anything of this sort? If not how should I proceed to
tackle this?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2014-07-09 17:54:35 Re: tweaking NTUP_PER_BUCKET
Previous Message Bruce Momjian 2014-07-09 17:37:57 Re: pg_resetxlog to clear backup start/end locations.