SQL Server Performance

How do I find all the statistics and statistics columns on a specified object?

Discussion in 'Other SQL Server Blogs around the Web' started by Anonymous, Aug 9, 2007.

  1. Anonymous New Member

    Run this TSQL on the database where you want to obtain the statistics information: SELECT s.name AS statistics_name ,c.name AS column_name ,sc.stats_column_id FROM sys.stats AS s INNER JOIN sys.stats_columns AS sc ON s.object_id = sc.object_id AND s.stats_id = sc.stats_id INNER JOIN sys.columns AS c ON sc.object_id = c.object_id AND c.column_id = sc.column_id WHERE s.object_id = OBJECT_ID('&lt;schema_name.object_name&gt;');...(<a href="http://sqlserver-qa.net/blogs/t-sql/archive/2007/08/09/1330.aspx">read more</a>)<img src="http://sqlserver-qa.net/aggbug.aspx?PostID=1330" width="1" height="1">

Share This Page