2007-10-26

How to clear SQL Server query cache

If you execute the same query two or more times in a row, the time it takes to complete might vary. If you are the only user on the database, it is because of the build in query cache.

The cache can be cleared with the following script:

DBCC DROPCLEANBUFFERS
DBCC FREEPROCCACHE

No comments: