|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Sunday, May 19, 2013 9:07 PM
Points: 162,
Visits: 336
|
|
Hi, I am a newbie.I was going around DMV and found out Plan_Handle. I find out that this column is used in most of the DMV . I tried to find out what does that mean on internet but not much information is given.The language specified on msdn website giving explanation about Plan_Handle is quite high by my measures. I am not able to get what does that Hex-Code Means.
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 12:38 AM
Points: 37,725,
Visits: 29,981
|
|
It doesn't mean much, it's just used to join several of the plan-related DMVs together.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP 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
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Sunday, May 19, 2013 9:07 PM
Points: 162,
Visits: 336
|
|
Hi GilaMonster, Then what does that hex-codes specifies. Any good resource where i can get the information about the DMV. I mean good resource so do not suggest MSDN
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 12:38 AM
Points: 37,725,
Visits: 29,981
|
|
I am going to suggest MSDN, because it is a good resource. All the DMVs are well documented there. Start with sys.dm_exec_cached_plans and have a look at all related DMVs.
Again, the plan handle is just a binary identifier. It just identifies a plan.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP 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
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Sunday, May 19, 2013 9:07 PM
Points: 162,
Visits: 336
|
|
In msdn i was looking for sys.dm_exec_query_stats in that there is a column name 'statement_start_offset' . Explanation of it is given as '.....the starting position of the query that the row describes within the text of its batch or persisted object.' . Now in this case what does "batch or persisted object."
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 12:38 AM
Points: 37,725,
Visits: 29,981
|
|
Batch - current batch of SQL statements (set of statements sent to the server) http://msdn.microsoft.com/en-us/library/ms175502%28v=sql.105%29.aspx Persisted object - stored procedure, function or trigger.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP 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
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Sunday, May 19, 2013 9:07 PM
Points: 162,
Visits: 336
|
|
Thanks man
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Sunday, May 19, 2013 9:07 PM
Points: 162,
Visits: 336
|
|
Hi Gila, Further into MSDN i found out the defination execution_count it is given as "Number of times that the plan has been executed since it was last compiled." So could you please tell me what does it mean by "Was last compiled". I know that we execute the query but compiled
|
|
|
|
|
SSC-Dedicated
           
Group: General Forum Members
Last Login: Today @ 12:38 AM
Points: 37,725,
Visits: 29,981
|
|
Compiled = plan generated by the optimiser. So that's the number of times that the procedure has been executed since the current execution plan was compiled by the optimiser.
Gail Shaw Microsoft Certified Master: SQL Server 2008, MVP 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
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Sunday, May 19, 2013 9:07 PM
Points: 162,
Visits: 336
|
|
| Please pardon me if i am wrong but isn't the query plan generated just when we press the execute button, if yes then that means every time plan is generated the query is executed.
|
|
|
|