As far as I recall the trigger to code sp_helpindex2 was that with the introduction of INCLUDE columns to indexes that was added in SQL Server 2005 the old way of viewing indexes using sp_helpindex was useless since Microsoft has not modified their procedure to support the recently added INCLUDE columns. I had therefore found myself, when tuning queries, scripting tables using SSMS just to view the indexes and to see the INCLUDE columns (and if existed at all).
Now, that did not feel quiet write and had led me to the idea of creating my own sp_helpindex which I named sp_helpindex2. Once the INCLUDE columns were added more ideas came in and the code has developed and grown to be what it had become today.
sp_helpindex2 exposes the indexes INCLUDE columns and far beyond. Check it and do not hesitate to post your comments back here.
-Yaniv
Latest posts by Yaniv Etrogi (see all)
- Monitor AlwaysOn Availabilty Groups - July 6, 2023
- SQL Server – The secret index syntax - February 8, 2023
- Use .net SqlClient with Powershell to access data - January 25, 2023
- Use Powershell to find unused resources in Azure - August 5, 2022