Query Processing Analysis

X-Query

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:

  1. Query Parser

  2. Query Optimizer

  3. Processor-specific Optimizer

  4. Index Processor

  5. 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.

XQuery

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.