DBCC DropCleanBuffers is great to use in a development or test environment to flush all of the clean data pages out of memory to use for performance testing purposes. This can be combined with DBCC FreeProcCache to simulate the state of a freshly started SQL Server without having to do a restart of the SQL Server.
DBCC DropCleanBuffers can be used to test queries with a cold buffer cache, meaning, any data pages will need to be loaded from disk in order for a query to run.
DBCC DROPCLEANBUFFERS Syntax:
dbcc dropcleanbuffers [ WITH NO_INFOMSGS ]
The following example will drop all the clean buffers out of memory causing a reload from next time they are needed.
You get a result of the following:
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
For more information see TSQL Wiki DBCC dropcleanbuffers.
DBCC Command month at SteveStedman.com is almost as much fun as a root canal.