Query Plan Viewer Tasks
This section discusses the following tasks:
1
Execute SET QRYPLAN = on to turn on the creation of a query plan.
2
See Query Plan Settings.
3
4
Execute SET QRYPLAN = off to turn off the creation of query plans.
1
a.
In Pervasive PSQL Control Center, click ToolsQuery Plan Viewer.
b.
Execute the file w3sqlqpv.exe located in the PSQL\Bin directory.
1
In the Query Viewer, click FileOpen.
2
The title bar of the Query Viewer informs you how many query plans are open and which plan you are viewing.
3
If you have more than one query plan open, use the View menu commands to navigate among the plans:
First or Ctrl + F. Displays the earliest loaded query plan.
Last or Ctrl + L. Displays the latest loaded query plan.
Next or Ctrl + N. Displays the next latest query plan.
Prev(ious) or Ctrl + P. Displays the next earliest query plan.
Goto or Ctrl + G. Displays the query plan based on the ordinal number of the loaded plans.
1
In the Query Viewer, click FileExport XML.
2
*Note: You can specify the name of a new XML file in the same dialog box.
*Tip: The Export XML menu item is enabled only if the query plan is loaded into the viewer.
The following table explains the schema of an XML file derived from an SQL query.
Click View then a desired sizing command:
Autofit. Sizes the query plan so that the entire plan is viewable in the Plan Viewer. The view resizes if you resize the window. Autofit is the default when you view a query plan.
100%, 50%, or 25%. Sizes the query plan to the specified percentage.
Percent. Sizes the query plan to the percent you specify.
Zoom In (-) or Zoom Out (+). Enlarges the size of the query plan (zoom in) or reduces the size of the query plan (zoom out). You can zoom between 5% and 500%.
Click View then a desired scroll command:
Scroll Left or Left Arrow. Scrolls toward the left side of the pane.
Scroll Up or Up Arrow. Scrolls toward the top of the pane.
Scroll Down or Down Arrow. Scrolls toward the bottom of the pane.
In the Query Viewer, click FileRefresh.
This re-reads the currently loaded query plan file.
In the Query Viewer, double-click one of the following nodes:
See Node Details.
In the Plan Viewer, click Subquery then the number of the subquery (the first subquery in the main query corresponds to "Subquery 1," the second subquery corresponds to "Subquery 2" and so forth). A query plan can contain any number of subqueries, or none. All subqueries for a query plan appear on the Subquery menu. When you select a subquery, its name appears in parentheses in the Plan Viewer title.