SQL/MX 2.x Query Guide (G06.24+, H06.03+)
Reviewing Query Execution Plans
HP NonStop SQL/MX Query Guide—523728-003
4-14
Getting Help for Visual Query Planner
Getting Help for Visual Query Planner
To access the Visual Query Planner online help facility, select Help > Visual Query
Planner Help. Access additional context-sensitive help by pressing F1 or through the
Properties dialog box. For more information, see Accessing Additional Information
About Operators on page 4-16.
Graphically Displaying Execution Plans
1. To start the Visual Query Planner, do one of the following:
•
Select Start > Programs > NonStop SQL-MX > Visual Query Planner.
•
Navigate to the C:\Program Files\Hewlett Packard\NonStop SQL-MX folder
and select and open Visual Query Planner.
After the program starts, you will notice that a default file name, VQP1,
appears on the title bar and that status messages appear along the bottom of
the window.
2. Select Explain > Connect to ODBC to connect to your ODBC data source.
For more information about connecting to MXCS, see the SQL/MX Connectivity
Services Manual.
After you are connected to your data source, notice that the status message along
the bottom of the window displays the data source name. Also notice that the
Connect to ODBC icon on the toolbar is dimmed, indicating that the connection
has been made.
3. In the top pane of the Visual Query Planner window, enter your query.
You must enter (or copy) the query rather than trying to execute a prepared query.
Visual Query Planner internally prepares the query and assigns it a statement
name.
4. Select Explain > Get Explain Plan to direct the EXPLAIN function to prepare and
display the query.
The operator tree for the query execution plan appears in the lower left pane of the
window (operator tree pane). Summary details for the operators appear in the right
lower pane of the window (summary detail pane). You can sort the summary detail
by clicking a column name to sort on that column. Figure 4-2 on page 4-15 shows
a query in the top pane and the subsequent query execution plan in the left lower
pane of the window.
Note. MXCS must be running on the server before you can connect Visual Query Planner
to MXCS.