Plan Reuse abfragen
DECLARE @string varchar(500)
SELECT
@string = '%SomeString%'
SELECT
SCP.usecounts, SCP.cacheobjtype, SCP.objtype,
[Statement].text,
Executionplan.query_plan
FROM
sys.dm_exec_cached_plans SCP
OUTER APPLY sys.dm_exec_sql_text(plan_handle) [Statement]
OUTER APPLY sys.dm_exec_query_plan(plan_handle) Executionplan
WHERE
Statement.[text] LIKE @string AND
SCP.cacheobjtype ='Compiled Plan' AND
SCP.objtype = 'proc'
| Print article | This entry was posted by Frank Kalis on 29.08.08 at 13:04:35 . Follow any responses to this post through RSS 2.0. |
Noch kein Feedback
Einen Kommentar hinterlassen
Trackback-Adresse für diesen Eintrag
http://www.insidesql.org/blogs/htsrv/trackback.php?tb_id=947
