The X-Query function ino:explain
retrieves information about
the execution plan of a query. The execution time of a query depends on the
number and kind of processes that are needed to resolve a query. A query is
processed in Tamino in the following order:
Query Parser
Query Optimizer
Processor-specific Optimizer
Index Processor
Postprocessor
A call to ino:explain
provides information about which
processing components are involved, to what degree the query can be optimized,
and the work load of the index processor and postprocessor. With the
information returned, you can rewrite your queries or update your schema to
minimize processing costs. A detailed description of this X-Query function can
be found in the X-Query Reference
Guide under the topic Functions.
If you add the explain
directive to the query prolog of
XQuery, the query will not be executed. Instead, an XML representation of the
execution plan for the query expression is returned in the result document. You
can use this information to determine which access paths will be used for
Tamino data during query execution. Further details can be found in the XQuery
4 Reference Guide, document
Query Execution
Plan.