-
Notifications
You must be signed in to change notification settings - Fork 995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sp_BlitzCache @SlowlySearchPlansFor not producing reliable results when looking for missing indexes #2202
Comments
Hey Brent, I think I might have some info here. Looks like casting the XML as NVARCHAR(MAX) removes the trailing space. Why? Well I haven't figured that part out. It's pretty easy to repro though:
I pulled out a random row with a Missing Index and the results look like this: Original (XML) column: CAST as NVARCHAR(MAX): Note the space is in the XML result only. The second one that is cast as NVARCHAR has no space. I'm not sure how to address it, but this looks like the problem. |
After much experimentation, I don't think there is a way to avoid the conversion to NVARCHAR causing the space to disappear. |
Ouch. Yeah, this is tough: if we strip out the spaces, we're going to false-positive on too many things. Closing. |
Explaining that SlowlySearchPlansFor hits a SQL Server bug, and added new sp_DatabaseRestore parameter. Closes #2202.
…ntation #2202 sp_BlitzCache documentation
Version of the script
SELECT @Version = '7.9', @VersionDate = '20191024';
What is the current behavior?
If I search for the exact plans producing a missing index recommendation, I'm not getting them. Logging where I'm at so far in the troubleshooting process:
The text was updated successfully, but these errors were encountered: