Comparing Execution Plans Textually

Teradata Visual Explain User Guide

brand
Teradata Tools and Utilities
prodname
Visual Explain
vrm_release
16.10
16.20
category
User Guide
featnum
B035-2504-086K

Use Teradata Visual Explain to generate a textual comparison of execution plans using reports.

  1. Click .

    The Select Execution Plan(s) to Open dialog box appears. The following options are available:

    Select Execution Plan(s) to Open

    • Plans from a database (go to step 2)
    • Open plans (go to step 3)
    • Offline plans (go to step 4)
  2. [Optional] To select plans from a database, use one of the following options:
    1. In the tree view, right-click the Query Capture Databases node and select Browse QCD to display the available QCD names in the tree view.
    2. Select a Browse QCD menu item to display the available QCD names.
    3. Right-click on a selected QCD to open the shortcut menu.
    4. Select the Browse Plans menu item to display the Browse QCD Plans dialog box.
      To load... Do the following...
      Plan associated with a workload In the Workload box, enter a workload name or click for a list of available workloads.
      Specific plan Do one of the following:
      • Enter a query-tag name in the Query Tag box.
        In this field, the % and _ symbols can be used as wildcard characters and can be used in any combination. The % symbol represents any string of zero or more arbitrary characters. For example, query% would match query, query1, query12, and so on. The _ symbol represents one arbitrary character; therefore, any single character is acceptable in the position in which _ appears.
      • Type a query ID number in the Query ID box.
      Range of plans Type a range in the Query ID box.

      For example, type 1-100 or 1,3,6-10.

      Plans from a different server
      1. In the tree view, right-click Open Plan then select Connect.
      2. After entering logon information, open the Browse Plans menu item for QCD,Browse DBQL Plans menu item for DBQL, and menu item Browse Offline Plans for Offline Plans.
      XML plans Select the QCD XML Plans.
  3. To select plans that are already open:
    1. Click Browse Opened Plans.
    2. Click Open to display the plans. The plans are listed under Selected Execution Plans.
  4. To select offline plans:
    1. In the tree view, right-click Offline plans and select Browse Offline Plans.
    2. From the Open dialog box, choose one or more plans.

      When selecting a file, the description of the plan appears under Description. If the file contains more than one plan, the Description box identifies the number of plans the file contains.

    3. Click Open. The plans are displayed in the Offline plans node.
  5. [Optional] To load one or more DBQL plans:
    1. In the tree view, right-click the DBQL XML Plan node and select DBQL Plans to display the Select DBQL Criteria dialog box.
    2. Under Selection, use one of the following options:
      • Select DBQL (default) to browse XML queries from the DBQL.
      • Select External Database to browse XML queries from an external database.
    3. [Optional] Set other options in the Select DBQL Criteria dialog box and click OK. The filtered DBQL plans are populated below the DBQL XML Plan node in the tree view.
    4. In the list of plans in the tree view, right-click the QueryID and select Add menu-item check box in the Available Execution Plans list.
    5. To select a base plan for the comparison, double-click a row under Select Execution Plan.
  6. [Optional] To see complete statement text, select a statement and then click .

    For more information on the Statement Text dialog box, see Viewing Statement Text.

  7. Select a base plan for the comparison by double-clicking a row in the Selected Execution Plans list.

    This moves the plan to the top of the Selected Execution Plans list and the plan is highlighted in green.

  8. Choose a plan to compare to the base plan by selecting the checkbox in the compare column next to the plan.
    Only two plans can be compared at a time.
  9. Click Compare to display the reports. The differences in the cells are highlighted in red.