Wednesday, March 17, 2010

Statistics basic

To list all of the statistics being maintained on a table-

select * from sys.stats where object_id = object_id('brkprd')


To retrieve detailed information about an index or statistic

dbcc show_statistics ('brkprd','IX_Brkprd_AcctIdIsNonZeroBP')