Filter sp_BlitzIndex output
-
02-10-2020 - |
Question
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.
Solution
We recently added more options to the 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.