October 3, 2012 at 12:57 am
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.
October 3, 2012 at 1:22 am
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, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 3, 2012 at 1:26 am
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 🙂
October 3, 2012 at 1:30 am
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, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 3, 2012 at 1:35 am
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."
October 3, 2012 at 2:05 am
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, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 3, 2012 at 2:46 am
Thanks man 🙂
October 3, 2012 at 3:35 am
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:unsure:
October 3, 2012 at 3:50 am
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, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
October 3, 2012 at 4:12 am
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.
October 3, 2012 at 6:31 am
No. http://msdn.microsoft.com/en-us/library/ee343986%28v=sql.100%29.aspx
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 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply