Study/Mssql2008. 8. 19. 16:26
dbcc freeproccache
로 생성된 모든 실행계획 삭제할수 있음

 select
       cacheobjtype, objtype, usecounts, sql
       from sys.syscacheobjects
      where
       sql not like 'sp_executesql%'
      and sql not like '%sys.%'
      and sql not like '%cache%'

-- Adhoc 쿼리를 count 로 소팅
select
       cacheobjtype, objtype, usecounts, sql
       from sys.syscacheobjects
      where
 --      sql not like 'sp_executesql%'
       sql not like '%sys.%'
      and sql not like '%cache%'
  and objtype='Adhoc'
order by usecounts desc
Posted by 영혼도둑