Skip to content

Show Index Statistics

The DBCC SHOW_STATISTICS variants for inspecting index statistics headers, density vectors and histograms.

Published Oct 17, 2009

The four flavors of DBCC SHOW_STATISTICS, ready to copy: STAT_HEADER for the summary (rows, distinct values, steps), DENSITY_VECTOR for the density values per leading column combination, HISTOGRAM for the full distribution, and the combined header-plus-density view. Replace the schema.table and index names and dig in.

DBCC SHOW_STATISTICS ('<Schema>.<Table>', '<Index>') WITH STAT_HEADER;
DBCC SHOW_STATISTICS ('<Schema>.<Table>', '<Index>') WITH DENSITY_VECTOR;
DBCC SHOW_STATISTICS ('<Schema>.<Table>', '<Index>') WITH HISTOGRAM;
DBCC SHOW_STATISTICS ('<Schema>.<Table>', '<Index>') WITH STAT_HEADER JOIN DENSITY_VECTOR;
An unhandled error has occurred. Reload 🗙