_ | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁
FrontPage › GetPerformanceTipsDirectlyFromSQLServer

DECLARE @StringToSearchFor VARCHAR(255) 
SET @StringToSearchFor ='%<MissingIndexes>%'
--'%<MissingIndexes>%'
--'%<ColumnsWithNoStatistics>%'
--'%<TableScan%' 
--'%CREATE PROC%MessageWrite%'

SELECT TOP 20 
st.text AS [SQL] 
, cp.cacheobjtype 
, cp.objtype 
, DB_NAME(st.dbid)AS [DatabaseName] 
, cp.usecounts AS [Plan usage] 
, qp.query_plan 
FROM sys.dm_exec_cached_plans cp 
CROSS APPLY sys.dm_exec_sql_text(cp.plan_handle) st 
CROSS APPLY sys.dm_exec_query_plan(cp.plan_handle) qp 
WHERE CAST(qp.query_plan AS NVARCHAR(MAX))LIKE @StringToSearchFor 
ORDER BY cp.usecounts DESC 
蠍 蠍郁鍵..
企: : るジ讓曙 襦螻豺 企Ν 譯殊語. 襦螻豺
EditText : Print : Mobile : FindPage : DeletePage : LikePages : Powered by MoniWiki : Last modified 2018-04-13 23:12:52

襷企 覲碁 り 螻 り . 蠏瑚 襷豺 蠍瑚骸 螳 蟆企. 覲碁 蠍語 . 蟇語願 襷讌覃 蠏瑚 螻 蠍語 蟆企. (語 螻モ譴)