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

Example Commands for Comparing Execution Plans Textually

The following table describes the commands for comparing execution plans using textual reports.

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