To retain cosnsistency for baseline testing and assist in query tuning use the following 2 commands:
Use DBCC DROPCLEANBUFFERS to flush out already cached plans.This will force the SQL Statement to recompile intstead of re using the cache available
Use DBCC FREEPROCCACHE to clear buffers from the buffer pool.
Running these 2 commands in between code changes allows a consistent comparision
/****************CODE START*********************
use master
DBCC DROPCLEANBUFFERS
GO
DBCC FREEPROCCACHE
************************************************/
Source:Jack Vamvas (http://www.sqlserver-dba.com)
Author: Jack Vamvas (http://www.sqlserver-dba.com)
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |