Breaking down DBCC CHECKTABLE by individual index?
If I loop through the indexes of a table and do a `DBCC CHECKTABLE (tablename, index_id)` on each, is that equivalent to doing just a DBCC CHECKTABLE (tablename)? Or am I doing a lot of overlapping work? [This Books Online entry] kind of implies that using the index_id will *also* do a check on the cluster (or HEAP): >"If index_id is specified, DBCC CHECKTABLE runs integrity checks only on that index, together with the heap or clustered index." So if I do: DBCC CHECKTABLE (tablename, cluster_id) DBCC CHECKTABLE (tablename, non_clustered_1) DBCC CHECKTABLE (tablename, non_clustered_2) Have I actually just checked the clustered index 3 times? Our environment has SQL 2000, 2005, and 2008 servers, so applies to all those versions. :
That's what I believe, given the BOL text. Makes sense if you think about it - the physical data is actually a heap or a clustered-index, so checking a particular index would by default check the data in whatever structure it is held.