The following process indicates the general phases of an index analysis:
- The analysis begins when an INITIATE INDEX ANALYSIS request is submitted.
- The database query analysis tool analyzes the submitted workload for indexing opportunities.
- The index recommendations are written to the IndexRecommendations, IndexColumns, and JoinIndexColumns tables of the specified QCD database.
- The recommendations are retrieved for evaluation using a set of SQL SELECT requests defined within a number of macros provided within each QCD.
For example, the following SELECT request is the core of the Recommendations macro.
SELECT TableName, DatabaseName, IndexTypeText, SpaceEstimate, IndexDDL FROM IndexRecommendations WHERE WorkloadID = :WorkloadID;
You can find a list of the index recommendation query macros in Teradata Vantageā¢ - SQL Request and Transaction Processing, B035-1142.