sp ya da sorguda execution FREEPROCCACHE TUM PLANLAR
Definition Description
SELECT TOP(100) [text], cp.size_in_bytes, usecounts, refcounts ,db_name(dbid) as dbName, 'DBCC FREEPROCCACHE ( ', plan_handle , ')' FROM sys.dm_exec_cached_plans AS cp CROSS APPLY sys.dm_exec_sql_text(plan_handle) WHERE cp.cacheobjtype = N'Compiled Plan' AND cp.objtype = N'Prepared' AND cp.usecounts > 1 ORDER BY cp.size_in_bytes DESC;