<?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: A Simple Refactoring &#8211; Functions in the WHERE Clause</title>
	<atom:link href="http://facility9.com/2010/02/17/a-simple-refactoring-functions-in-the-where-clause/feed" rel="self" type="application/rss+xml" />
	<link>http://facility9.com/2010/02/17/a-simple-refactoring-functions-in-the-where-clause</link>
	<description>Jeremiah Peschka&#039;s ruminations on sql, ruby, c#, and other things</description>
	<lastBuildDate>Fri, 03 Sep 2010 21:05:14 -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 Post 133 &#171; Rhonda Tipton&#8217;s WebLog</title>
		<link>http://facility9.com/2010/02/17/a-simple-refactoring-functions-in-the-where-clause#comment-1159</link>
		<dc:creator>Weekly Link Post 133 &#171; Rhonda Tipton&#8217;s WebLog</dc:creator>
		<pubDate>Fri, 19 Feb 2010 19:44:15 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=1350#comment-1159</guid>
		<description>[...] A Simple Refactoring &#8211; Functions in the WHERE Clause &#8211; &#8220;Putting functions in the where clause of a SQL Statement can cause performance problems.&#8221; [...]</description>
		<content:encoded><![CDATA[<p>[...] A Simple Refactoring &#8211; Functions in the WHERE Clause &#8211; &#8220;Putting functions in the where clause of a SQL Statement can cause performance problems.&#8221; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremiah Peschka</title>
		<link>http://facility9.com/2010/02/17/a-simple-refactoring-functions-in-the-where-clause#comment-1156</link>
		<dc:creator>Jeremiah Peschka</dc:creator>
		<pubDate>Thu, 18 Feb 2010 16:58:39 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=1350#comment-1156</guid>
		<description>Hey Rob - thanks for taking the time to share some of your blog posts and especially your LiveMeeting for PASS in April!

I&#039;m aware that this is a contrived example. I was using this as a recipe to show a basic technique for developers who are getting started with SQL and looking to apply a simple refactoring to their T-SQL to make it run well.</description>
		<content:encoded><![CDATA[<p>Hey Rob &#8211; thanks for taking the time to share some of your blog posts and especially your LiveMeeting for PASS in April!</p>
<p>I&#8217;m aware that this is a contrived example. I was using this as a recipe to show a basic technique for developers who are getting started with SQL and looking to apply a simple refactoring to their T-SQL to make it run well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob Farley</title>
		<link>http://facility9.com/2010/02/17/a-simple-refactoring-functions-in-the-where-clause#comment-1155</link>
		<dc:creator>Rob Farley</dc:creator>
		<pubDate>Thu, 18 Feb 2010 01:41:23 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=1350#comment-1155</guid>
		<description>Sure, but it shouldn&#039;t matter in this particular case. Check my blogpost at http://msmvps.com/blogs/robfarley/archive/2010/01/22/sargable-functions-in-sql-server.aspx and the associated Connect item.

But also, consider the fact that if you were doing a join between two tables, you might find that your query needed to have a function on a column in one of the tables. Moving it to the right doesn&#039;t help, because you&#039;re still telling the system that it can&#039;t consider the original form of one of the columns. I go into this in another recent post.
http://msmvps.com/blogs/robfarley/archive/2010/02/02/a-case-study-in-sargability.aspx

And in fact, will be covering this in a LiveMeeting session in April: http://www.sqlpass.org/Events/ctl/ViewEvent/mid/521.aspx?ID=334</description>
		<content:encoded><![CDATA[<p>Sure, but it shouldn&#8217;t matter in this particular case. Check my blogpost at <a href="http://msmvps.com/blogs/robfarley/archive/2010/01/22/sargable-functions-in-sql-server.aspx" rel="nofollow">http://msmvps.com/blogs/robfarley/archive/2010/01/22/sargable-functions-in-sql-server.aspx</a> and the associated Connect item.</p>
<p>But also, consider the fact that if you were doing a join between two tables, you might find that your query needed to have a function on a column in one of the tables. Moving it to the right doesn&#8217;t help, because you&#8217;re still telling the system that it can&#8217;t consider the original form of one of the columns. I go into this in another recent post.<br />
<a href="http://msmvps.com/blogs/robfarley/archive/2010/02/02/a-case-study-in-sargability.aspx" rel="nofollow">http://msmvps.com/blogs/robfarley/archive/2010/02/02/a-case-study-in-sargability.aspx</a></p>
<p>And in fact, will be covering this in a LiveMeeting session in April: <a href="http://www.sqlpass.org/Events/ctl/ViewEvent/mid/521.aspx?ID=334" rel="nofollow">http://www.sqlpass.org/Events/ctl/ViewEvent/mid/521.aspx?ID=334</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremiah Peschka</title>
		<link>http://facility9.com/2010/02/17/a-simple-refactoring-functions-in-the-where-clause#comment-1154</link>
		<dc:creator>Jeremiah Peschka</dc:creator>
		<pubDate>Wed, 17 Feb 2010 21:56:53 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=1350#comment-1154</guid>
		<description>Thanks for spotting that. I&#039;ve updated the post. I must have missed that while fighting with the syntax highlighter.</description>
		<content:encoded><![CDATA[<p>Thanks for spotting that. I&#8217;ve updated the post. I must have missed that while fighting with the syntax highlighter.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nighthawk</title>
		<link>http://facility9.com/2010/02/17/a-simple-refactoring-functions-in-the-where-clause#comment-1153</link>
		<dc:creator>Nighthawk</dc:creator>
		<pubDate>Wed, 17 Feb 2010 19:45:34 +0000</pubDate>
		<guid isPermaLink="false">http://facility9.com/?p=1350#comment-1153</guid>
		<description>Your 2nd option is incorrect; since the dates are inverted so should the offset. It should be &quot;... DATEADD(MM, -2, ...&quot;</description>
		<content:encoded><![CDATA[<p>Your 2nd option is incorrect; since the dates are inverted so should the offset. It should be &#8220;&#8230; DATEADD(MM, -2, &#8230;&#8221;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
