Tools for Analyzing Indexes

To expose and understand index structures fully, there are a few tools that we’re going to use. To make the scenarios easier to understand, we need to get a feel for which tool is the most appropriate to use and when. In addition, this section focuses on an overview of the options for execution, as well as some tips and tricks. However, details on analyzing various aspects of the output can be found throughout this chapter.

Using the dm_db_index_physical_stats DMV

The sys.dm_db_index_physical_stats function is one of the most useful functions to determine table structures. This DMV can give you insight into whether or not your table has a clustered index, how many nonclustered indexes exist, and whether or not your table ...

Get Microsoft® SQL Server® 2008 Internals now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.