Saving an Execution Plan

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

One or more execution plans can be saved to a file (.vec). Saving an execution plan creates what is referred to as an offline plan. Optionally, the corresponding visual plan, Explain text, statement text, or tool tips can be saved.

When saving the plan as a file, a file name can be entered or automatically generated. To generate a file name automatically, one or more parameters must be selected. The parameters form the foundation of the file name. For example, selecting the USER and SERVER parameters results in a plan saved as john_server1.vec.

Before saving, open one or more execution plans.

  1. Click .

    The Save As dialog box appears.



  2. Under Save Options, do one of the following:
    • Select one or more check boxes to define the type of information saved.

    • Select the All check box (default setting) to save all options.

    Check Box Description
    All Saves the visual plan, Explain text, statement text, and tool tips in separate files.
    Explain text Saves the Explain text of the plan in a text file (.txt).
    Tool tips Saves the tool tips that are displayed in the visual plan in a text file (.txt).
    Visual plan Saves the plan details into a binary file (.vec).

    Also saves the Explain text, statement text, and tool tips in the .vec file so they are available when the offline plan is opened.

    Statement text Saves the query text of the plan in a text file (.sql).
  3. [Optional] Under Multiple Plans, click Select plans to select open plans to save.
  4. [Optional] Under Multiple Plans, select check boxes to further define how the selected plans are saved.
    Check Box Description
    Save multiple plans Save all plans selected in Step 3.
    If the check box is clear, only the active plan is saved. Click Select plans to specify plans to save.
    Save all plans to single file Save all plans selected in Step 3 to a single file. The file name must be specified in the File Name box.
    Automatic filename generation is unavailable when this check box is selected, and the File Name Preview box becomes the File Name box. If the Save all plans to single file check box is clear, plans are saved to separate files.
  5. Under File Name Format, do one of the following:
    • To create the file name manually:
      1. Clear the Generate file name(s) automatically check box.
      2. Type a file name in the File Name box.
    • To generate the file name automatically:
      1. Select the Generate file name(s) automatically check box (default setting).
      2. In the Available box, select one or more parameters.
      3. Click Add.
      Parameter Information Included in File Name
      USER Name of the user who captured the plan
      SERVER Name of the server where the plan was captured
      QUERYTAG Query tag for the plan
      QCD QCD for the plan
      QUERYID Query ID for the plan
      TIMESTAMP Date and time the file is saved
      Format is day, month, hour, minute, second (ddmmm-hh-mm-ss).

    Selected parameter names appear in the File Name Preview box. Parameter names appear in the order in which they were selected and are separated by the _ symbol. For example, if the first parameter selected and moved to the Selected box is SERVER and the second parameter is USER, the file name is SERVER_USER .

  6. [Optional] To remove parameters so they are not included in the file name:
    1. In the Selected box, select the parameter to remove.
    2. Click Remove.
  7. [Optional] To change the default location at which the file is saved, do one of the following:
    • Type a location in the Path box.
    • Click to browse for a folder.
  8. Click Save to save the execution plans.