Exec SP_HelpStats @TableName, 'ALL'
Select Object_Name(Object_Id) Tbl,
Stats_Date(Object_Id, stats_id) As [Stats_Date],
*
From sys.stats
Where Object_Id = Object_Id(@TableName);
Select *,
Object_Name(Object_Id) Tbl,
Stats_Date(Object_Id, index_id) As [Stats_Date]
From sys.indexes
Where Object_Id = Object_Id(@TableName);
Select Object_name(id),
rowmodctr,
*
From sysindexes
Where Object_name(id)=@TableName
DBCC Show_Statistics(@TableName,@ColumnName) With Histogram
No comments:
Post a Comment