Tools for analyzing indexes

To help you understand index structures fully, this section uses a few tools whose appropriate use you need to get a feel for. This section also focuses on an overview of the options for execution, as well as some tips and tricks. The details on analyzing various aspects of the output can be found throughout this chapter.

Using the dm_db_index_physical_stats DMV

One of the most useful functions that you can use to determine table structures is sys.dm_db_index_physical_stats. This DMV can provide insight into whether your table has a clustered index, how many nonclustered indexes exist, and whether your table (and each index) has row-overflow or Large Object (LOB) data. Most importantly, it can expose to you the entire ...

Get Microsoft SQL Server 2012 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.