开发者

SQL Server Capture Execution Plan

开发者 https://www.devze.com 2023-01-27 07:41 出处:网络
I want to capture execution plan only for long running 开发者_开发技巧query (5 minutes) for this I have used extended event but the plan_handle which is returned by extended events does not produce an

I want to capture execution plan only for long running 开发者_开发技巧query (5 minutes) for this I have used extended event but the plan_handle which is returned by extended events does not produce an execution plan when I pass this plan_handle to sys.dm_exec_query_plan. But for the same statement I am getting execution plan when I use sys.dm_exec_query_stats.

Is it possible to get execution plan only for long running query using server side trace

My motto is to capture execution plan for long running queries & save this plan in target for later analysis. For this purpose I can't go with dmv's please


This will be possible in the next version (SQL Server 2012). See related connect item.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号