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