DBCC SHOW_STATISTICS

Display the current distribution statistics for the specified target on the specified table.

Syntax
      DBCC SHOW_STATISTICS ('table' | 'view' , target)
         [WITH [NO_INFOMSGS] option  [, option...] ]
    
Options:
    STAT_HEADER
    DENSITY_VECTOR
    HISTOGRAM

Key:
   table / view - The table or indexed view for which to display stats
   target       - The column, index or statistics for which to display stats.
	NO_INFOMSGS  - Suppress all information messages (severity 0-10)

Specifying any of the 3 options will return only those statistics.

Example

DBCC SHOW_STATISTICS ('MySchema.MyTable', MyIndex);
GO

"A lawyer who represents himself has a fool for a client." ~ proverb

Related:

UPDATE STATISTICS
sp_createstats
sp_updatestats
Equivalent Oracle commands: INDEX_STATS   DBA_TAB_COL_STATISTICS


 
Copyright © SS64.com 1999-2019
Some rights reserved