snippetsqlModerate
Filter sp_BlitzIndex output
Viewed 0 times
filteroutputsp_blitzindex
Problem
Is it possible to filter results of sp_BlitzIndex to show only unused and duplicate indexes? If so, how?
I haven't tried anything yet. Was just giving a thought of inserting sp output in a table and then filter it there. But I am sure there must be a better way.
I know this should go to Brent and team. But posting it here to get some more interesting answers.
I haven't tried anything yet. Was just giving a thought of inserting sp output in a table and then filter it there. But I am sure there must be a better way.
I know this should go to Brent and team. But posting it here to get some more interesting answers.
Solution
We recently added more options to the
The closest it gets to that is to run it with
I suggest storing the output to a table and querying it for only the unused/dupes. Probably not the answer you were hoping for, but
sp_BlitzIndex output, but the kind of housecleaning mode you're asking about isn't one of them, unfortunately. The closest it gets to that is to run it with
@Mode = 4 (as of v3.0) or @Mode = 0 (prior to v3.0), which I suspect you're already doing. The benefit to using the v3.0 is you can use the @GetAllDatabases = 1 parameter to collect all the unused/dupes for the whole SQL Server instance in one pass. I suggest storing the output to a table and querying it for only the unused/dupes. Probably not the answer you were hoping for, but
sp_BlitzIndex doesn't have that functionality built in.Context
StackExchange Database Administrators Q#140731, answer score: 10
Revisions (0)
No revisions yet.