background image
<< Using PlanExporter | The details element >>

PlanExporter XML format

<< Using PlanExporter | The details element >>
Derby Tools and Utilities Guide
66
To generate the XML file as well, specify the following options:
-xml path -html path
To use a different style sheet that does not contain any javascript functions, specify
the following options:
-xsl path -html path
To generate the XML file as well, specify the following options:
-xml path -xsl path -html path
· To generate an advanced view of the query plan, you can
use advanced XSL style sheets provided with Derby inside
derbytools.jar/org/apache/derby/impl/tools/planexporter/resources/, or you can
specify a style sheet created by you. To do this, specify the following options:
-adv -xsl fileName -xml path
Note:
· Before you use the
-adv
feature, you must copy the advanced XSL style
sheet into the current directory. Thus, you must specify only the name of the
style sheet, not the path.
· Generating HTML is not supported when you use the
-adv
feature of the
PlanExporter
tool. But if you open the generated XML file in a web browser,
the browser will do the necessary transformation.
PlanExporter XML format
The
PlanExporter
tool extracts the query plan of an executed query as a XML
document by using the statistics captured from Derby XPLAIN style tables.
An XML document generated by the
PlanExporter
tool has the following structure.
· The basic tree structure:
·
plan
: The root of the XML tree
·
statement
: First child, the query executed
·
time
: Second child, the time that this query executed
·
stmt_id
: Third child, the STMT_ID of the query
·
details
: Fourth child, containing the query plan
· The
statement
element:
This element has only its value. That value implies the query executed, as retrieved
from the STMT_TEXT row of SYSXPLAIN_STATEMENTS table.
For example:
<statement>select * from my_table</statement>
· The
time
element:
This element has only its value. That value implies the date & time which the query
executed, as retrieved from the XPLAIN_TIME row of SYSXPLAIN_STATEMENTS
table.
For example:
<time>2010-07-13 14:27:59.405</time>
· The
stmt_id
element:
This element has only its value. That value implies the statement id of the query
executed, as retrieved from the STMT_ID row of SYSXPLAIN_STATEMENTS table.