DropStatRecs Example - Teradata Vantage

Teradata® VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Vantage
Published
January 2023
ft:locale
en-US
ft:lastEdition
2024-12-11
dita:mapPath
phg1621910019905.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
phg1621910019905

This example reports any recommendations to drop statistics that currently exist on database ‘V6_ADW’.

BTEQ -- Enter your SQL request or BTEQ command:
.set sidetitles on
.set foldline on

CALL TDStats.DropStatRecs('{"DatabaseName":"V6_ADW"}');

Result:

Rank                                                    1
SCOID                                       1100007
DatabaseName                        V6_ADW
TableName                               Dept
FieldNames                              D_Desc
StatType                                   F
Status                                      Pending Recommendation
MostRecentTimeStamp           2019-01-17 11:33:28.980000+00:00
LastOptimizerUsage                2018-10-31 00:00:00.00
ReCollectionElapsedTime       0:00:01.230000
RecDDLText                           DROP STATISTICS COLUMN("D_Desc") ON V6_ADW.Dept;
Description                            Drop stat rec on column that was last used by the Optimizer on 2018-10-31 and whose estimated recollection time is 83 seconds.
.
.
.