<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title> &#187; DBCC DROPCLEANBUFFERS</title>
	<atom:link href="http://benchmarkitconsulting.com/tag/dbcc-dropcleanbuffers/feed/" rel="self" type="application/rss+xml" />
	<link>http://benchmarkitconsulting.com</link>
	<description></description>
	<lastBuildDate>Tue, 15 May 2012 12:54:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Performance Tuning &#8211; Level Playing Field</title>
		<link>http://benchmarkitconsulting.com/colin-stasiuk/2009/01/06/performance-tuning-level-playing-field/</link>
		<comments>http://benchmarkitconsulting.com/colin-stasiuk/2009/01/06/performance-tuning-level-playing-field/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 14:57:03 +0000</pubDate>
		<dc:creator>Colin Stasiuk</dc:creator>
				<category><![CDATA[Benchmark IT Consulting]]></category>
		<category><![CDATA[Colin Stasiuk]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[DBCC]]></category>
		<category><![CDATA[DBCC DROPCLEANBUFFERS]]></category>
		<category><![CDATA[DBCC FREEPROCCACHE]]></category>
		<category><![CDATA[Performance Tuning]]></category>

		<guid isPermaLink="false">http://benchmarkitconsulting.com/?p=269</guid>
		<description><![CDATA[When you&#8217;re performance tuning T-SQL one thing you want to make sure is that you are have a consistent environment to test your changes/modifications.  Two commands that will help ensure that your environment stays close to the same for each iteration of your script are DBCC DROPCLEANBUFFERS and DBCC FREEPROCCACHE. Now for all those people testing [...]]]></description>
			<content:encoded><![CDATA[<p>When you&#8217;re performance tuning T-SQL one thing you want to make sure is that you are have a consistent environment to test your changes/modifications.  Two commands that will help ensure that your environment stays close to the same for each iteration of your script are <a href="http://msdn.microsoft.com/en-us/library/ms187762.aspx" target="_blank">DBCC DROPCLEANBUFFERS</a> and <a href="http://msdn.microsoft.com/en-us/library/ms174283.aspx" target="_blank">DBCC FREEPROCCACHE</a>.</p>
<p>Now for all those people testing in production (first hang your head in shame <img src='http://benchmarkitconsulting.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) you should use ALOT of caution with these two DBCC commands (or better yet just avoid them altogether in production).</p>
<p><strong>DBCC DROPCLEANBUFFERS</strong> gives you a cold buffer cache while avoiding a full service shutdown/restart.  Good to do a CHECKPOINT before running this command so all the dirty pages for your database that you&#8217;re working with will be written to disk.  Using this command will help give you a level playing field and an accurate estimation of your codes execution time.  Not using this command might end up with a cached query and your changes (while great I&#8217;m sure) might seem to make a big difference without really doing so.</p>
<p><strong>DBCC FREEPROCCACHE</strong> gives you the ability to clear all (or a specific) elements from the plan cache or remove all workload groups from a specified resource pool.  Once again be very careful where you use this as clearing your plan cache will cause stored procs to be recompiled which will give you a performance degredation. </p>
<p>These two DBCC commands can help out alot when trying to troubleshoot/optimize T-SQL code.  Run them both before each execution of the code you are working with to help make sure that the positive effect that you&#8217;re seeing is due to your code and not cached information.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Performance+Tuning+%26%238211%3B+Level+Playing+Field+http://tinyurl.com/akucvb" title="Post to Twitter"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-twitter-big4.png" alt="Post to Twitter" /></a> <a class="tt" href="http://delicious.com/post?url=http://benchmarkitconsulting.com/colin-stasiuk/2009/01/06/performance-tuning-level-playing-field/&amp;title=Performance+Tuning+%26%238211%3B+Level+Playing+Field" title="Post to Delicious"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-delicious-big4.png" alt="Post to Delicious" /></a> <a class="tt" href="http://digg.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2009/01/06/performance-tuning-level-playing-field/&amp;title=Performance+Tuning+%26%238211%3B+Level+Playing+Field" title="Post to Digg"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-digg-big4.png" alt="Post to Digg" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://benchmarkitconsulting.com/colin-stasiuk/2009/01/06/performance-tuning-level-playing-field/&amp;title=Performance+Tuning+%26%238211%3B+Level+Playing+Field" title="Post to StumbleUpon"><img class="nothumb" src="http://benchmarkitconsulting.com/wp-content/plugins/tweet-this/icons/tt-su-big4.png" alt="Post to StumbleUpon" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://benchmarkitconsulting.com/colin-stasiuk/2009/01/06/performance-tuning-level-playing-field/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

