Plans can be loaded from QCDs across servers using the command line interface.
To open the execution plan for a query, use the following command:
VEComp -p <Online plan description1,
[Online plan description2...] > [View Mode]
Online Plan Description
{<Logon Specification>
-d <database name> {-rc <Range condition> || -t <query tag>}
{ -ux || -unx}}
Logon Specification
{
{ -l <Server Name>\<User Id>\<Password>} ||
{ -c <ODBC DSN Name>}
}
Range Condition
{
{ QueryId1[{ {,} || {-}} QueryId2...]}
}
Online Plan Description for XML
Note: Only available for Teradata Database version 13.10 and later.
{<Logon Specification>}
-d <database name> -xml {-rc <Range condition>}
Table 47 describes commands for opening an online execution plan.
Example |
Command |
Description |
1 |
VEComp -p -l sysB\dbc\dbc -d qcd
-rc 73-78
|
Opens execution plans whose queryID is in the range 73–78 from the database qcd on server sysB using CLIv2 connectivity. |
2 |
Vecomp -p -l sysB\dbc\dbc -d qcd -xml
-rc 73-78
|
Opens execution plans captured in XML format whose queryid is in the range 73-78 from the database qcd on server SysB using CLI connectivity. This command is only available for Teradata Database 13.10 and later. Note: You cannot open both XML and normal execution plans at the same time. |
3 |
VEComp -p -l sysB\dbc\dbc -d qcd
-rc 73,78
|
Opens execution plans having queryID 73, 78 from the database qcd on server SysB using CLIv2 connectivity. |
4 |
VEComp -p -l sysB\dbc\dbc -d qcd
-rc 73-78,51,52
|
Opens execution plans having queryID in the range 73–78 and 51, 52 from the database qcd on server SysB using CLIv2 connectivity. |
5 |
VEComp -p -c sysB -d qcd
-rc 73-78,51,52
|
Opens execution plans having queryID in the range 73–78 and 51, 52 from the database qcd on server SysB using ODBC connectivity. |
6 |
VEComp -p -l sysB\dbc\dbc -d qcd
-rc 73-78 -l sysA\dbc\dbc -d qcd
-rc 75-80
|
Opens execution plans having queryID in the range 73–78 from database qcd on server sysB, and having queryID in the range 75–80 from database qcd on server SysA using CLIv2 connectivity. |
7 |
VEComp -p -l sysB\dbc\dbc -d qcd
-rc 73-78 -ux
|
Uses QCD X views while retrieving execution plans whose queryID is in the range 73–78 from the database qcd on server sysB using CLIv2 connectivity. |
8 |
VEComp -p -l sysB\dbc\dbc -d qcd
-rc 73-78 -unx
|
Uses QCD Non‑X views while retrieving execution plans whose queryID is in the range 73–78 from the database qcd on server sysB using CLIv2 connectivity. |