Viewing Execution Plan(s) - Visual Explain

Teradata Visual Explain User Guide

Product
Visual Explain
Release Number
16.20
16.10
Published
May 2017
Language
English (United States)
Last Update
2018-05-04
dita:mapPath
pvi1488824663157.ditamap
dita:ditavalPath
Audience_PDF_include.ditaval
dita:id
B035-2504
Product Category
Teradata Tools and Utilities

The View Execution Plan(s) feature can be accessed through the command line interface.

  1. To capture and then display the execution plan for a query, use the following command:
    VEComp -ie <Logon specifications> [-db <default database>]
    [-d <qcdname>] <SQL Statement> [-t <query tag>]

    SQL Statement

    {
    {-q <SQL test>} || {-f <SQL file> } SQL file is assumed to be text
    file.
    }

    If the -d option is not specified, then "qcd" is used by default.

  2. To capture and then display the execution plan in XML for a query, use the following command:
    VEComp -iex <Logon specifications> [-db <default database>]
    [-d <qcdname>] <SQL Statement> [-t <query tag>]
  3. To display the execution plan in XML for a query, without storing on the database, use the following command:
    VEComp -eix <Logon specifications> [-db <default database>] <SQL Statement>

Example Commands for View Execution Plan(s)

The following table describes commands used with View Execution Plan(s).

Examples for View Execution Plan(s) 
Example Command Description
1
VEComp -ie -l SysA\dbc\dbc
-db "mydb" -q "sel * from mytbl1"
Inserts the execution plans for the given query into the qcd database on server SysA and then displays it.
2
VEComp -iex -l SysA\dbc\dbc -db
"mydb" -q "sel * from mytbl1"
Inserts the execution plans for the given query in XML format into the QCD database on server SysA and then displays it.
Only available for Teradata Database version 13.10 and later.
3
VEComp -ie -l SysA\dbc\dbc
-d "mydb"
-q "sel * from mydb.statistics"
-q "sel * from mydb.columns"
-t "MyQuery1" -t "MyQuery2"
Inserts the execution plans for the given queries into the database on server SysA and displays them. Query tag for the execution plans are "MyQuery1" and "MyQuery2" respectively.
4
VEComp -ie -c SysA -d QCD
-f SQLfile.txt
-t "customer query1"
-db "MyDb"
SQL text is loaded from file SQLfile.txt. Execution plan for the SQL statement is inserted into the qcd database and displayed. MyDb is the default database for executing the query.
5
VEComp -eix -l SysA\dbc\dbc
-db “mydb” -q “sel * from mytbl1”
Generates an XML document for the given query on server SysA and then displays it.