sp_BlitzIndex®

sp_BlitzIndex® – SQL Server’s Index Sanity Test

Your SQL Server indexes may be less sane than you think. Download sp_BlitzIndex® to find out– or scroll on down and watch a video to see how it help you find out:

  • Do you have duplicate indexes wasting your storage and memory?
  • Would you like help to find unused indexes that are bloating your backups?
  • Have wide clustering keys snuck into your schema, inflating your indexes?
  • Are there active heaps lurking in your database, causing strange fragmentation?
  • Is blocking creeping up behind you before you can realize it?

Our free sp_BlitzIndex® stored procedure quickly does a sanity check on your database and diagnoses your indexes major disorders, then reports back to you. Each disorder has a URL that explains what to look for and how to handle the issue. sp_BlitzIndex® also saves YOUR sanity when index tuning, by giving you the option to see both the “missing” and existing indexes for a table in a single view– when prevents you from going crazy and adding duplicate indexes.

Download it in our free First Responder Kit.

Common sp_BlitzIndex® Parameters

@GetAllDatabases = 1 – runs index tests across all of the databases on the server instead of just your current database context. If you’ve got more than 50 databases on the server, this only works if you also pass in @BringThePain = 1, because it’s gonna be slow. @DatabaseName, @SchemaName, @TableName – if you only want to examine indexes on a particular table, fill all three of these out. @SkipPartitions = 1 – goes faster on databases with large numbers of partitions, like over 500. @Mode – options are:

  • 0 (default) – basic diagnostics of urgent issues
  • 1 – summarize database metrics
  • 2 – index usage detail only
  • 3 – missing indexes only
  • 4 – in-depth diagnostics, including low-priority issues and small objects

@Filter – only works in @Mode = 0. Options are:

  • 0 (default) – no filter
  • 1 – no low-usage warnings for objects with 0 reads
  • 2 – only warn about objects over 500MB

@ThresholdMB = 250 – number of megabytes that an object must be before we display its data in @Mode = 0. @Help = 1 – explains the rest of sp_BlitzIndex’s parameters.

How to get support for sp_BlitzIndex

The sp_BlitzIndex documentation covers additional parameters that will return more results, store the results to a table, and more.

For free interactive support, you’ve got a few good options:

Want training on this?

In my How I Use the First Responder Kit class, I teach you the most important parameters and how I use them in my day-to-day work.

Once you’ve conquered that, my Fundamentals classes cover index tuning, query tuning, TempDB, running SQL Server in the cloud, and much more.

Brent Ozar

Want consulting help?

Don’t have time to learn the hard way? I’m here to help with a quick, easy process that gets to the root cause of your database health and performance pains. Learn more, see sample reports, and book a free call with me.