April 12, 2018 at 6:40 pm
Hi all.
Recently I have found with the help of one of the Bent Ozar, scritps. One called spBlitzCache.
And found some disturbing when the script tried to get the plan for a specific query.
The meseage says that it cant find a plan for this query. Possible reasons include SQL RECOMPILE and encrypted code.
I have reviewed the suspect query and found no sentences with this code.
Do you know some other reasons to get this strange behaivor?
Thank you in advance.
April 16, 2018 at 11:58 am
mig28mx - Thursday, April 12, 2018 6:40 PMHi all.
Recently I have found with the help of one of the Bent Ozar, scritps. One called spBlitzCache.
And found some disturbing when the script tried to get the plan for a specific query.
The meseage says that it cant find a plan for this query. Possible reasons include SQL RECOMPILE and encrypted code.
I have reviewed the suspect query and found no sentences with this code.Do you know some other reasons to get this strange behaivor?
Thank you in advance.
He posted an answer to the question before:
sp_blitzcache not returning an execution plan for a long running query
Sue
April 16, 2018 at 12:20 pm
mig28mx - Thursday, April 12, 2018 6:40 PMHi all.
Recently I have found with the help of one of the Bent Ozar, scritps. One called spBlitzCache.
And found some disturbing when the script tried to get the plan for a specific query.
The meseage says that it cant find a plan for this query. Possible reasons include SQL RECOMPILE and encrypted code.
I have reviewed the suspect query and found no sentences with this code.Do you know some other reasons to get this strange behaivor?
Thank you in advance.
Your best option is to do the estimated plan if the actual plan isn't cached, the plan will be the same although missing some actual statistics
😎
My friend Grant Fritchley stated this and I'll take his word for it 😉
April 17, 2018 at 3:53 am
Eirikur Eiriksson - Monday, April 16, 2018 12:20 PMYour best option is to do the estimated plan if the actual plan isn't cached, the plan will be the same although missing some actual statistics
😎
It won't be missing actual statistics, because plans fetched from cache don't have actual statistics either. Estimated plan is the same as you would get if you pull a plan out of the cache.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 17, 2018 at 7:51 am
mig28mx - Thursday, April 12, 2018 6:40 PMHi all.
Recently I have found with the help of one of the Bent Ozar, scritps. One called spBlitzCache.
And found some disturbing when the script tried to get the plan for a specific query.
The meseage says that it cant find a plan for this query. Possible reasons include SQL RECOMPILE and encrypted code.
I have reviewed the suspect query and found no sentences with this code.Do you know some other reasons to get this strange behaivor?
Thank you in advance.
If you have "Optimize for Ad Hoc Queries" turned on, there may only be a shell of the execution plan the first time it executes. (EDIT... just saw that Sue also said that) It also happens if the query uses a Temp Table. That's NOT a reason to avoid the use of Temp Tables, though.
--Jeff Moden
Change is inevitable... Change for the better is not.
April 17, 2018 at 10:37 am
Jeff Moden - Tuesday, April 17, 2018 7:51 AMIt also happens if the query uses a Temp Table. That's NOT a reason to avoid the use of Temp Tables, though.
Shouldn't happen.
Plan generation has to be deferred until the point the query executes, but it shouldn't prevent it from being cached.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply