Sqlserver-dba.com

Query baseline testing

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)

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

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.

Working...

Post a comment


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact