-- find counts of query re-use SELECT * FROM ( select *, (select object_name(objectid) from sys.dm_exec_sql_text(p.plan_handle)) AS SNAME from sys.dm_exec_cached_plans p where usecounts <= 1 --and objtype != 'adhoc' --and objtype != 'prepared' ) t WHERE SNAME IS NOT NULL order by usecounts, size_in_bytes desc
Popular search terms:
