How to Clear SQL Server Cache When Performing Benchmark Tests

I was testing the perfomance of a query from different perspectives and wanted to make sure SQL Server didn’t cache Query results, to achieve this:

run DBCC DROPCLEANBUFFERS, which clears all data from the cache. Then run DBCC FREEPROCCACHE, which clears the stored procedure cache.

found at:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.