clear query cache sql server
snippet in sql

clear query cache sql server

user9725

DBCC FREEPROCCACHE
DBCC DROPCLEANBUFFERS

DBCC DROPCLEANBUFFERS clears clean (unmodified) pages from the buffer pool
Precede that with a CHECKPOINT to flush any dirty pages to disk first
DBCC FLUSHPROCINDB clears execution plans for that database