To clean cache:
DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE
To view cache list (SQL 2005):
SELECT objtype, p.size_in_bytes, t.[text], usecounts
FROM sys.dm_exec_cached_plans p
OUTER APPLY sys.dm_exec_sql_text (p.plan_handle) t
WHERE objtype IN ('Prepared', 'Adhoc')
ORDER BY usecounts DESC
Tuesday, January 12, 2010
Subscribe to:
Post Comments (Atom)
1 comment:
Hi - I am really delighted to find this. great job!
Post a Comment