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
로 생성된 모든 실행계획 삭제할수 있음
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