View Execution Plan(S) - Visual Explain

Teradata Visual Explain User Guide

Product
Visual Explain
Release Number
15.00
Language
English (United States)
Last Update
2018-09-27
dita:id
B035-2504
lifecycle
previous
Product Category
Teradata Tools and Utilities

View Execution Plan(S)

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

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.

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>]

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> 

Table 45 describes commands used with View Execution Plan(S).

 

Table 45: 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.

Note: 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.