RESTART INDEX ANALYSIS Examples | SQL Statements | Teradata Vantage - RESTART INDEX ANALYSIS Examples - Analytics Database - Teradata Vantage

SQL Data Manipulation Language

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-12-13
dita:mapPath
pon1628111750298.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esx1472246586715
lifecycle
latest
Product Category
Teradata Vantage™

Example: Index Analysis With CHECKPOINT

Assume that the query capture database named MyQCD exists on the system. The workload named MyWorkload in MyQCD consists of 100 SQL requests. The following SQL request causes the index analysis information to be saved after every 10 SQL requests because of its CHECKPOINT clause specification:

     INITIATE INDEX ANALYSIS ON tab1 
     FOR MyWorkload 
     IN MyQCD AS table_1Index 
     CHECKPOINT 10;

Suppose a database restart occurs while processing the 55th SQL request. The system then records the information pertaining to the first 50 SQL requests processed.

The following SQL request causes the analysis to be done from the 51st SQL request.

     RESTART INDEX ANALYSIS 
     FROM MyWorkload 
     IN MyQCD AS table1_Index;

Example: Index Analysis Without CHECKPOINT

Again assume that the query capture database MyQCD exists on the system and that the workload named MyWorkload consists of 100 SQL requests.

The following SQL request does not specify a checkpoint, so no incremental information is written to the AnalysisLog table in MyQCD.

     INITIATE INDEX ANALYSIS ON tab1 
     FOR MyWorkload 
     IN MyQCD AS table_1Index;

Suppose once again that a database restart occurs while processing the 55th SQL request.

The following SQL request returns an error because there is no row in AnalysisLog that checkpoints the specified index analysis name, table_1Index.

     RESTART INDEX ANALYSIS      FROM MyWorkload      IN MyQCD AS table_1Index;
     *** Failure 5669 No restart information found for specified index      analysis ‘table_1Index'.