<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Wide vs. Narrow Plans</title><link>http://blogs.msdn.com/bartd/archive/2006/07/27/wide-vs-narrow-plans.aspx</link><description>Here's another case where you might see intermittently poor performance that is "by design". Suppose you see that a delete, insert, or update query in a stored proc usually runs quickly, but occasionally the query takes much longer to complete. You captured</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Deadlock Troubleshooting, Part 3</title><link>http://blogs.msdn.com/bartd/archive/2006/07/27/wide-vs-narrow-plans.aspx#2361533</link><pubDate>Tue, 01 May 2007 22:08:22 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2361533</guid><dc:creator>Bart Duncan's SQL Weblog</dc:creator><description>&lt;p&gt;Here’s an example of the classic scenario that is usually used to introduce the concept of a deadlock&lt;/p&gt;
</description></item><item><title>re: Wide vs. Narrow Plans</title><link>http://blogs.msdn.com/bartd/archive/2006/07/27/wide-vs-narrow-plans.aspx#4050779</link><pubDate>Thu, 26 Jul 2007 01:47:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4050779</guid><dc:creator>Michael Teper</dc:creator><description>&lt;p&gt;Bart, is there a way of forcing narrow vs. wide plan?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;</description></item><item><title>re: Wide vs. Narrow Plans</title><link>http://blogs.msdn.com/bartd/archive/2006/07/27/wide-vs-narrow-plans.aspx#4051476</link><pubDate>Thu, 26 Jul 2007 02:10:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4051476</guid><dc:creator>bartd</dc:creator><description>&lt;p&gt;No, unfortunately not. &amp;nbsp;If you have a parameter sniffing issue where a wide plan occasionally gets stuck in cache where you want a narrow plan (or vice versa), you might consider: &lt;/p&gt;
&lt;p&gt; - An &amp;quot;OPTION (OPTIMIZE FOR @param=...)&amp;quot; hint. &amp;nbsp;Plug in a parameter there that causes the desired plan. &amp;nbsp;If the query text can't be easily modified, you could apply this hint with a plan guide. &amp;nbsp;&lt;/p&gt;
&lt;p&gt; - An &amp;quot;OPTION (RECOMPILE)&amp;quot; so that everyone gets a plan custom tailored to their params. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Both of the above are only available on SQL 2005 and later. &amp;nbsp;On SQL 2000 you could approximate the recompile hint with a WITH RECOMPILE (on stored proc definition) or dynamic SQL. &lt;/p&gt;
</description></item><item><title>Optimized Non-clustered Index Maintenance</title><link>http://blogs.msdn.com/bartd/archive/2006/07/27/wide-vs-narrow-plans.aspx#4402351</link><pubDate>Wed, 15 Aug 2007 19:51:16 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4402351</guid><dc:creator>Craig Freedman's WebLog</dc:creator><description>&lt;p&gt;Insert, update, and delete plans consist of two parts. The first part or read cursor identifies the list&lt;/p&gt;
</description></item><item><title>MSDN Blog Postings  &amp;raquo; Optimized Non-clustered Index Maintenance</title><link>http://blogs.msdn.com/bartd/archive/2006/07/27/wide-vs-narrow-plans.aspx#4403992</link><pubDate>Wed, 15 Aug 2007 22:37:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4403992</guid><dc:creator>MSDN Blog Postings  » Optimized Non-clustered Index Maintenance</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://msdnrss.thecoderblogs.com/2007/08/15/optimized-non-clustered-index-maintenance/"&gt;http://msdnrss.thecoderblogs.com/2007/08/15/optimized-non-clustered-index-maintenance/&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>