DEFINITIONS

Definitions More Info.
Definition ID668
TitleSQL
CategoryNOTES
DefinitionReturning the batch text of cached entries that are reused
Definition DescriptionA. Returning the batch text of cached entries that are reused The following example returns the SQL text of all cached entries that have been used more than once.
SELECT DISTINCT usecounts, cacheobjtype, objtype, text
FROM sys.dm_exec_cached_plans CROSS APPLY sys.dm_exec_sql_text(plan_handle)
WHERE usecounts > 1
--AND text like '%FROM KFormIlanDB%'
ORDER BY usecounts DESC
GO
RecordBycunay
Record Date20-10-2015 13:51:40
Düzenle
Kopyala
Sil