<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: How I Get By Without sysadmin</title>
	<atom:link href="http://facility9.com/2009/01/14/how-i-get-by-without-sysadmin/feed" rel="self" type="application/rss+xml" />
	<link>http://facility9.com/2009/01/14/how-i-get-by-without-sysadmin</link>
	<description>Jeremiah Peschka&#039;s ruminations on sql, ruby, c#, and other things</description>
	<lastBuildDate>Wed, 28 Jul 2010 14:05:12 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Weekly Link Roundup 2009-02-04 &#124; codegumbo</title>
		<link>http://facility9.com/2009/01/14/how-i-get-by-without-sysadmin#comment-190</link>
		<dc:creator>Weekly Link Roundup 2009-02-04 &#124; codegumbo</dc:creator>
		<pubDate>Thu, 05 Feb 2009 02:26:48 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=265#comment-190</guid>
		<description>[...] How I Get By Without Sysadmin:  Jeremiah Peschka has a great article on tuning queries from a developer&#8217;s perspective.  I&#8217;ve been a big advocate of some of his methods for a while now, and it&#8217;s nice to see other people come to some of the same conclusions that I have. [...]</description>
		<content:encoded><![CDATA[<p>[...] How I Get By Without Sysadmin:  Jeremiah Peschka has a great article on tuning queries from a developer&#8217;s perspective.  I&#8217;ve been a big advocate of some of his methods for a while now, and it&#8217;s nice to see other people come to some of the same conclusions that I have. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Log Buffer #131: a Carnival of the Vanities for DBAs</title>
		<link>http://facility9.com/2009/01/14/how-i-get-by-without-sysadmin#comment-162</link>
		<dc:creator>Log Buffer #131: a Carnival of the Vanities for DBAs</dc:creator>
		<pubDate>Fri, 16 Jan 2009 17:18:29 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=265#comment-162</guid>
		<description>[...] facility9, coincidentally, Jeremiah Peschka has How I Get By Without sysadmin. &#8220;&#160;.&#160;.&#160;.&#160;I don’t have sysadmin access on our servers, nor do I have any [...]</description>
		<content:encoded><![CDATA[<p>[...] facility9, coincidentally, Jeremiah Peschka has How I Get By Without sysadmin. &#8220;&nbsp;.&nbsp;.&nbsp;.&nbsp;I don’t have sysadmin access on our servers, nor do I have any [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Walsh</title>
		<link>http://facility9.com/2009/01/14/how-i-get-by-without-sysadmin#comment-161</link>
		<dc:creator>Mike Walsh</dc:creator>
		<pubDate>Thu, 15 Jan 2009 12:11:27 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=265#comment-161</guid>
		<description>smart workaround for the ad hoc. Yes sometimes index hints can definitely help to force a certain order or use a certain plan. I have also seen them cause issues and often I see them used because someone doesn&#039;t understand indexes. In that case, they don&#039;t understand bookmark lookups (You found the index key in your index but that index doesn&#039;t have other columns found in your select, for instance.. so it has to do a lookup... expensive with a lot of rows) or they don&#039;t understand that sometimes a scan is a better option. Like you say though, they have their place. Even join hints can have their place :)</description>
		<content:encoded><![CDATA[<p>smart workaround for the ad hoc. Yes sometimes index hints can definitely help to force a certain order or use a certain plan. I have also seen them cause issues and often I see them used because someone doesn&#8217;t understand indexes. In that case, they don&#8217;t understand bookmark lookups (You found the index key in your index but that index doesn&#8217;t have other columns found in your select, for instance.. so it has to do a lookup&#8230; expensive with a lot of rows) or they don&#8217;t understand that sometimes a scan is a better option. Like you say though, they have their place. Even join hints can have their place <img src='http://facility9.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremiah Peschka</title>
		<link>http://facility9.com/2009/01/14/how-i-get-by-without-sysadmin#comment-160</link>
		<dc:creator>Jeremiah Peschka</dc:creator>
		<pubDate>Thu, 15 Jan 2009 02:40:25 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=265#comment-160</guid>
		<description>Mike - Good point about using OPTION(RECOMPILE). I typically refrain from recommending that people use query level options simply because some of the others options available (FORCE ORDER, for example) can have unintended side effects. However, when tuning queries for selectivity OPTION(RECOMPILE) can be a great resource.

Of cousre, with OPTION RECOMPILE, you also have to weigh the CPU cost of continuously recompiling execution plans versus the cost of a poor, but not awful, execution plan.

Thanks for adding the link to Itzik&#039;s article about recompiling select queries, it makes for great background info to add to anyone&#039;s performance tuning toolkit. It&#039;s not as much of a black art as people make it out to be, it just requires some careful thought, a solid methodology, and (on occasion) digging into the nasty guts of the execution plan.

As far as index hinting goes, it&#039;s usually something I save for the end of query tuning, but I always consider it an option. In the current application I&#039;m working on, all database activity is controlled through stored procedures and some of the procedures have up to 12 parameters. Certain combinations of parameters produce different join paths. In cases like that providing the query engine with as much information up front is key to getting the queries to perform adequately. In one scenario, I was able to tune the execution of the query from 4 minutes and 28 seconds to 6 seconds by carefully apply indexes (I avoided plan caches by constantly generating new GUIDs and putting random spaces in my ad hoc SQL, which works to avoid cached plans for the moment).</description>
		<content:encoded><![CDATA[<p>Mike &#8211; Good point about using OPTION(RECOMPILE). I typically refrain from recommending that people use query level options simply because some of the others options available (FORCE ORDER, for example) can have unintended side effects. However, when tuning queries for selectivity OPTION(RECOMPILE) can be a great resource.</p>
<p>Of cousre, with OPTION RECOMPILE, you also have to weigh the CPU cost of continuously recompiling execution plans versus the cost of a poor, but not awful, execution plan.</p>
<p>Thanks for adding the link to Itzik&#8217;s article about recompiling select queries, it makes for great background info to add to anyone&#8217;s performance tuning toolkit. It&#8217;s not as much of a black art as people make it out to be, it just requires some careful thought, a solid methodology, and (on occasion) digging into the nasty guts of the execution plan.</p>
<p>As far as index hinting goes, it&#8217;s usually something I save for the end of query tuning, but I always consider it an option. In the current application I&#8217;m working on, all database activity is controlled through stored procedures and some of the procedures have up to 12 parameters. Certain combinations of parameters produce different join paths. In cases like that providing the query engine with as much information up front is key to getting the queries to perform adequately. In one scenario, I was able to tune the execution of the query from 4 minutes and 28 seconds to 6 seconds by carefully apply indexes (I avoided plan caches by constantly generating new GUIDs and putting random spaces in my ad hoc SQL, which works to avoid cached plans for the moment).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Walsh</title>
		<link>http://facility9.com/2009/01/14/how-i-get-by-without-sysadmin#comment-159</link>
		<dc:creator>Mike Walsh</dc:creator>
		<pubDate>Thu, 15 Jan 2009 02:15:03 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=265#comment-159</guid>
		<description>article about recompile: http://www.sqlmag.com/Article/ArticleID/94369/sql_server_94369.html</description>
		<content:encoded><![CDATA[<p>article about recompile: <a href="http://www.sqlmag.com/Article/ArticleID/94369/sql_server_94369.html" rel="nofollow">http://www.sqlmag.com/Article/ArticleID/94369/sql_server_94369.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Walsh</title>
		<link>http://facility9.com/2009/01/14/how-i-get-by-without-sysadmin#comment-158</link>
		<dc:creator>Mike Walsh</dc:creator>
		<pubDate>Thu, 15 Jan 2009 02:12:51 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=265#comment-158</guid>
		<description>disclaimer: So I like to save index hints for dead last and you do convey that but even with dynamic SQL sometimes index hints are not the only solution. There are some cases where you need to always recompile a proc or a statement within a proc when using dynamic SQL.

Also for parameter sniffing, the recompile hint is another good option. If the parameters can be vastly different or refer to data with big cardinality differences than perhaps the recompile hint can be your friend here as well. The local parameters option sort of has a similar effect and can also work.

Great post again because it shows those two important pieces of writing well performing code: 1.) Using common sense and a careful methodology and 2.) You are actually looking at your code and looking at query plans and using empirical evidence with changes! 

Sometimes just getting folks to look at query plans can be a big battle :)</description>
		<content:encoded><![CDATA[<p>disclaimer: So I like to save index hints for dead last and you do convey that but even with dynamic SQL sometimes index hints are not the only solution. There are some cases where you need to always recompile a proc or a statement within a proc when using dynamic SQL.</p>
<p>Also for parameter sniffing, the recompile hint is another good option. If the parameters can be vastly different or refer to data with big cardinality differences than perhaps the recompile hint can be your friend here as well. The local parameters option sort of has a similar effect and can also work.</p>
<p>Great post again because it shows those two important pieces of writing well performing code: 1.) Using common sense and a careful methodology and 2.) You are actually looking at your code and looking at query plans and using empirical evidence with changes! </p>
<p>Sometimes just getting folks to look at query plans can be a big battle <img src='http://facility9.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Walsh</title>
		<link>http://facility9.com/2009/01/14/how-i-get-by-without-sysadmin#comment-157</link>
		<dc:creator>Mike Walsh</dc:creator>
		<pubDate>Thu, 15 Jan 2009 01:53:05 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=265#comment-157</guid>
		<description>great article, I&#039;ll be sharing this with some developers on my team. It isn&#039;t as complex as so many people fear and make it out to be. You explain how simple it can be if people apply logic and a methodology to their actions.</description>
		<content:encoded><![CDATA[<p>great article, I&#8217;ll be sharing this with some developers on my team. It isn&#8217;t as complex as so many people fear and make it out to be. You explain how simple it can be if people apply logic and a methodology to their actions.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
