<?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>Joel Hainley &#187; SQL</title>
	<atom:link href="http://www.joelhainley.com/index.php/tag/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joelhainley.com</link>
	<description>my thoughts and adventures</description>
	<lastBuildDate>Mon, 19 Dec 2011 19:34:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SQL Server Notes #2 &#8211; How To Ensure SQL Server Will Ignore Your Indexes</title>
		<link>http://www.joelhainley.com/index.php/2010/01/14/sql-server-notes-2-how-to-ensure-sql-server-will-ignore-your-indexes/</link>
		<comments>http://www.joelhainley.com/index.php/2010/01/14/sql-server-notes-2-how-to-ensure-sql-server-will-ignore-your-indexes/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 19:49:37 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server Notes Series]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=203</guid>
		<description><![CDATA[Hopefully that title got your attention. When I started reading about some of the things that can cause the query optimizer to ignore your indexes it really caught my attention. Below are a few seemingly innocuous things that you can do in your sql statements to force the query optimizer to happily ignore your indexes.

Use [...]]]></description>
			<content:encoded><![CDATA[<p>Hopefully that title got your attention. When I started reading about some of the things that can cause the query optimizer to ignore your indexes it really caught my attention. Below are a few seemingly innocuous things that you can do in your sql statements to force the query optimizer to happily ignore your indexes.</p>
<ul>
<li><strong><em>Use a NOT operator in your WHERE clause</em></strong> &#8211; That&#8217;s right, if you don&#8217;t want to use indexes just drop a NOT operator in your WHERE clause</li>
<li><strong><em>When Using An OR operator, reference columns that are not indexed</em></strong> &#8211; If you specify columns in an OR operator that are not indexed, all indexes that are associated with columns in the or clause will be ignored.</li>
<li> <strong><em>Put a leading wildcard character in your WHERE clause</em></strong> &#8211; If you do something along the lines of &#8220;select NAME from school_records WHERE name is like %XX%&#8221;, the index that you put in to speed up searches of the names will do absolutely no good.</li>
</ul>
<p>There will probably be MANY more things that I will discover as time goes along related to nuances of indexes but I thought these were interesting because they seem really harmless. I think it&#8217;s useful to know that how you go about logically selecting data can impact query performance in potentially drastic ways</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/01/14/sql-server-notes-2-how-to-ensure-sql-server-will-ignore-your-indexes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server Notes #1 &#8211; Boolean Operator Precedence</title>
		<link>http://www.joelhainley.com/index.php/2010/01/07/sql-server-notes-1-boolean-operator-precedence/</link>
		<comments>http://www.joelhainley.com/index.php/2010/01/07/sql-server-notes-1-boolean-operator-precedence/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 00:42:10 +0000</pubDate>
		<dc:creator>joelhainley</dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[SQL Server Notes Series]]></category>

		<guid isPermaLink="false">http://www.joelhainley.com/?p=200</guid>
		<description><![CDATA[This shocked me a bit because I&#8217;ve never run into a problem with the evaluation of the boolean operators. I suspect this is because I make liberal use of parenthesis when I&#8217;m writing out SQL statements.  However boolean operators are evaluated in the following order : NOT, AND, OR.  As I said it&#8217;s not a [...]]]></description>
			<content:encoded><![CDATA[<p>This shocked me a bit because I&#8217;ve never run into a problem with the evaluation of the boolean operators. I suspect this is because I make liberal use of parenthesis when I&#8217;m writing out SQL statements.  However boolean operators are evaluated in the following order : NOT, AND, OR.  As I said it&#8217;s not a huge problem to deal with, a few parenthesis will fix any issues that you might encounter, but it could create some interesting problems if you aren&#8217;t aware of it and the parenthesis keys on your keyboard is broken.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.joelhainley.com/index.php/2010/01/07/sql-server-notes-1-boolean-operator-precedence/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

