SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Stored Procedure looses execution plan.


Stored Procedure looses execution plan.

Author
Message
Bhuvnesh
Bhuvnesh
SSCertifiable
SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)

Group: General Forum Members
Points: 5538 Visits: 4076
GilaMonster (12/27/2012)
Bhuvnesh (12/27/2012)
will this option also return value when first time exec plan get created ?


Yes

is this option gives the value of 'reason for early termination' when query tried to use same plan for last time ? like if we get "timed out" , does that mean that query coudnt able to generate new plan and used plder one ?


No. Did you do the research?

yes i got few links from "Grant Fritchey" like http://www.scarydba.com/2010/11/18/reason-for-early-termination-of-statement/ but still i have these two questions.

-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
Bhuvnesh
Bhuvnesh
SSCertifiable
SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)

Group: General Forum Members
Points: 5538 Visits: 4076
Another question,

When select shows the “Reason For Early Termination” is “Time Out.” then optimizer simply stopped trying and takes the plan that is currently the best, which might be a good plan… or it might not be, and applies that plan to the query. So here the chosen plan is the stored plan (stored at the time of previous runs) ?

-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
GilaMonster
GilaMonster
SSC Guru
SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)SSC Guru (91K reputation)

Group: General Forum Members
Points: 91927 Visits: 45285
Bhuvnesh (12/28/2012)
So here the chosen plan is the stored plan (stored at the time of previous runs) ?


Huh? I already said that the optimiser will not return the previous cached plan (if one exists) if it terminates early.

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

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Bhuvnesh
Bhuvnesh
SSCertifiable
SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)

Group: General Forum Members
Points: 5538 Visits: 4076
GilaMonster (12/28/2012)
I already said that the optimiser will not return the previous cached plan (if one exists) if it terminates early.
So does it mean that here this option only depicts the state of currently generated plan whether its case of "timed-out", “Memory Limit Exceeded.” OR “Good Enough Plan Found.” ?

-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search