December 19, 2008 at 8:12 am
I want to try this on my own, but I'm a bit busy. Has anyone tried querying sys.dm_exec_query_plan?
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
December 19, 2008 at 8:28 am
Grant Fritchey (12/19/2008)
I want to try this on my own, but I'm a bit busy. Has anyone tried querying sys.dm_exec_query_plan?
Plans are there. Fairly easy to identify too, the objectid in sys.dm_exec_query_plan will match with the function's id.
select * from sys.dm_exec_query_stats qs
cross apply sys.dm_exec_query_plan (qs.plan_handle) qp
where qp.objectid = Object_ID('Function Name')
The main problem with both profiler and the DMV in general is the permissions required. Not all devs are going to have Alter Trace and View Server State rights.
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 2 posts - 16 through 16 (of 16 total)
You must be logged in to reply to this topic. Login to reply