How find last collect statistics submission time, collection time and skip count in Teradata

SELECT DatabaseName

,TableName

,ColumnName

,CAST(LastCollectTimeStamp AS Date) As CollectionDate

,CAST(LastAlterTimeStamp AS Date) As LastSubmitDate

,StatsSkipCount

FROM DBC.TableStatsV

WHERE ColumnName IS NOT NULL

and databasename= <'Database_name'>

and tablename=<'Table_name'>;

 

Example:

SELECT DatabaseName

,TableName

,ColumnName

,CAST(LastCollectTimeStamp AS Date) As CollectionDate

,CAST(LastAlterTimeStamp AS Date) As LastSubmitDate

,StatsSkipCount

FROM DBC.TableStatsV

WHERE ColumnName IS NOT NULL

and databasename= 'DBC'

-- and tablename=<'Table_name'>

order by 1,2,3

;



Comments