Code: Fixing a Filtered Index Which is Causing Data Modifications to Fail
This question came up in a webcast recently: if a filtered index is causing data modifications to fail, does disabling the filtered index fix the …
Read Moreon • 2 min read
Ever see those little green messages at the top of an execution plan?
Those are missing index suggestions.
SQL Server loves to suggest that you consider changing up your index game.
The hint looks like this:

SQL Server can suggest multiple indexes for a single query. It’s difficult to tell when that happens, though.
Not only will you only ever see one hint at the top of the plan, it isn’t necessarily the index that SQL Server thinks will help the most! And if you right click on the plan and script the index to a new window, you only get the index request from the green hint. If there’s another one, it doesn’t script.
You can right click the plan and look at the XML and look for the missing indexes section. But it’s a bit of a pain to do each time. You can also open the plan in the free Sentry One Plan Explorer (or run the query from Plan Explorer in the first place), but you may not always have it installed.
With that top left operator highlighted, I open the properties window and, voila– I can expand ‘Missing indexes’ and quickly tell that there are two index suggestions for this query:

Check out those ‘impact’ numbers. SQL Server thinks one of these indexes will reduce the estimated cost of the query plan by 93.6%. Unfortunately that is not the hint showing in green– and it’s not the hint that will script out if I right click the plan and script indexes.
You can expand out all the nodes to view the index requests in the properties pane– but it’s kind of a pain, no pun intended. I really like this just for a quick check of the suggestion count, and then I’ll either go to the XML or to Plan Explorer. (Much of the time there’s just one suggestion.)
Nope. The missing index request is being a bit over-eager here, and it’s asking for more than it needs. I’ll write more about that in tomorrow’s post.
Copyright (c) 2025, Catalyze SQL, LLC; all rights reserved. Opinions expressed on this site are solely those of Kendra Little of Catalyze SQL, LLC. Content policy: Short excerpts of blog posts (3 sentences) may be republished, but longer excerpts and artwork cannot be shared without explicit permission.