Comparing Execution Plans Using Text Reports - 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

Comparing Execution Plans Using Text Reports

Two or more execution plans can be compared using reports through the command line interface.

To compare execution plans using reports, use the following command:

VEComp -tc <Execution Plan1 [Execution Plan2...]> <[compare attribute]>

Compare Attribute

{
{ -a}  || {-cs} || {-sc} || {-jo} || {-jc} || {-ta} 
|| {- op} || {-opd} || {-rsc}
}

The first plan specified in the command is the base plan for comparison.

Table 49 describes the commands for comparing execution plans using textual reports.

 

Table 49: Examples for Comparing Execution Plans Using Text Reports 

Example

Command

Description

1

VEComp -tc  -l sysB\dbc\dbc 
-d qcd -rc 73-78 -l sysA\dbc\dbc 
-d qcd -rc 75-80

Open execution plans whose queryID is in the range 73–78 from database qcd on server sysB, and whose queryID is in the range 75–80 from database qcd on server sysA using CLIv2 connectivity.

Textual compare differences are displayed for complete information.

2

VEComp -tc -l sysB\dbc\dbc 
-d qcd -rc 73-78 -l sysA\dbc\dbc 
-d qcd  -rc 75-80 -a

Open execution plans whose queryID is in the range 73–78 from database qcd on server sysB, and whose queryID is in the range 75–80 from database qcd on server sysA using CLIv2 connectivity.

Textual compare differences are displayed for complete information.

3

VEComp -tc -l sysB\dbc\dbc 
-d qcd -rc 73-78

Opens execution plans whose queryID is in the range 73–78 from database qcd on server sysB, using CLIv2 connectivity.

Textual compare differences are displayed for complete information. In this example, plan with queryID.

4

VEComp -tc -l sysB\dbc\dbc 
-d qcd -xml -rc 73-78

Opens and then compares execution plans captured in XML format whose queryID is in the range 73–78 from the database qcd on server sysB using CLIv2 connectivity.

Note: Only available for Teradata Database version 13.10 and later. You cannot compare XML and normal execution plans at the same time using the command line option.

5

VEComp -tc -l sysB\dbc\dbc 
-d qcd -rc 73 -l sysA\dbc\dbc 
-d qcd  -rc 75-80 -sc

Open execution plans whose queryID is 73 from database qcd on Server sysB, and whose queryID is in the range 75–80 from database qcd on server sysA using CLIv2 connectivity.

Textual compare window is displayed only for Software configuration differences.

6

VEComp -tc -f ValidVECfile1.vec 
-f ValidVECfile2.vec -ta

Opens execution plans from files ValidVECfile1, ValidVECfile2.vec.

Textual compare window is displayed only for target attribute differences.

7

VEComp -tc -f ValidVECfile1.vec ValidVECfile2.vec -jc

Opens execution plans from files ValidVECfile1, ValidVECfile2.vec.

8

VEComp -tc -f ValidVECfile1.vec 
-l sysB\dbc\dbc -d qcd -rc 73 -rsc

Opens execution plan from files ValidVECfile1and online execution plan whose queryID is 73 from database qcd on server sysB, and compares them.

Textual compare window is displayed only for residual Condition differences.

9

VEComp -tc -f ValidVECfile1.vec 
-l sysB\dbc\dbc -d qcd -rc 73 -cs

Opens execution plan from files ValidVECfile1and online execution plan whose queryID is 73 from database qcd on server sysB, and compares them.

Textual compare window is displayed only for cost differences.

10

VEComp -tc -f ValidVECfile1.vec 
-l sysB\dbc\dbc -d qcd -rc 11 -ic

Opens execution plan from files ValidVECfile1and online execution plan whose queryID is 11 from database qcd on server sysB, and compares them.

Textual compare window is displayed only for index condition differences.