Parts of a Query Plan

The graphic representation of a query plan is a tree structure that provides the details of how DataDirect XQuery will execute the query for which the plan was generated. The query plan tree diagram is read-only, though it does provide navigation and formatting features. You can also print and save the query plan as HTML.

In addition to the Plan node, the query plan tree can include Adaptors, Global Variables, and Local Functions nodes. These nodes are described in the following table.

Table 106. Query Plan Nodes
Node
Description
Adaptors
This node contains a list of database resources that will be involved in the execution of the query. These resources can include JDBC connections, temporary tables, and deferred SQL statements used in the context of DataDirect XQuery update functionality.
Global Variables
This node contains a list of global variables that are available to the query plan, such as external variables defined by the query and variables defined as part of the generation of the execution plan.
Local Functions
This node contains a list of user-defined functions used during the query evaluation. Each user-defined function listed in this node has a plan description associated with it. Plan descriptions are described next.
Plan
This node contains the description of the query execution plan. It contains the nodes of the plan, for example, FLWOR nodes and the nodes within the FLWOR nodes such as for, let, and return.

Navigation

You can navigate the tree to check where variables are defined and where they are referenced. For example, you can navigate from one adaptor's definition to its references and vice-versa.

To navigate the tree, you can

l Use the toolbar displayed at the top of the tree
l Right-click an item in the tree and use the context-sensitive menu
l Scroll through the nodes on the tree diagram individually

Query Plan Toolbar

The query plan toolbar has buttons that help you navigate the variables defined in your XQuery code. These buttons are described in the following table.

 
Free Stylus Studio XML Training: