17.05 - Example: Index Analysis and Table List - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Manipulation Language

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1146-175K
Language
English (United States)

When you specify a table list, then only that list of tables is considered for index analysis. If the workload does not have any tables matching at least one table in the list, then an error is reported. Otherwise, only the matching list of tables is considered for selecting the indexes.

Assume that MyWorkload describes the workload for tables table_1, table_2 and table_3. The following INITIATE INDEX ANALYSIS request performs successfully and the recommendations are considered only for table_1 and table_2 because table_3 is not specified in the table list.

     INITIATE INDEX ANALYSIS ON table_1, table_2
     FOR MyWorkload
     INTO MyQCD
     AS table_1Index;

Suppose MyWorkload describes the workload for table_1 and table_2 only. The following INITIATE INDEX ANALYSIS request fails because table_3 and table_4 are not defined in the workload.

     INITIATE INDEX ANALYSIS ON table_3, table_4
     FOR MyWorkload
     IN MyQCD
     AS table_1Index;

     *** Failure 5638 No match found for specified tables in the workload
     'MyWorkload'.