<?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: Troubleshooting SQL index performance on varchar columns</title>
	<atom:link href="http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/feed/" rel="self" type="application/rss+xml" />
	<link>http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/</link>
	<description>Strong opinions, weakly held</description>
	<lastBuildDate>Fri, 17 May 2013 09:02:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
	<item>
		<title>By: Marc Scheuner</title>
		<link>http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-5615</link>
		<dc:creator>Marc Scheuner</dc:creator>
		<pubDate>Wed, 06 Mar 2013 10:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-5615</guid>
		<description>Interestingly, with Entity Framework (an ORM), you *can* define whether or not to use Unicode strings - with things like data annotations on your model classes, or with  .AsNonUnicode(). On the other hand, with *RAW* ADO.NET (which certainly doesn&#039;t &quot;hide&quot; the database in any way, shape or form), you can&#039;t seem to define this - it will always use N&#039;.....&#039;  for your search parameters - even if the underlying column is a &quot;varchar&quot; - thus killing your query performance .....</description>
		<content:encoded><![CDATA[<p>Interestingly, with Entity Framework (an ORM), you *can* define whether or not to use Unicode strings &#8211; with things like data annotations on your model classes, or with  .AsNonUnicode(). On the other hand, with *RAW* ADO.NET (which certainly doesn&#8217;t &#8220;hide&#8221; the database in any way, shape or form), you can&#8217;t seem to define this &#8211; it will always use N&#8217;&#8230;..&#8217;  for your search parameters &#8211; even if the underlying column is a &#8220;varchar&#8221; &#8211; thus killing your query performance &#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik</title>
		<link>http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-5458</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Thu, 31 Jan 2013 09:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-5458</guid>
		<description>Excellent! Just sent it over to our developers :)</description>
		<content:encoded><![CDATA[<p>Excellent! Just sent it over to our developers <img src='http://lostechies.com/jimmybogard/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Skov Boisen</title>
		<link>http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-4801</link>
		<dc:creator>Simon Skov Boisen</dc:creator>
		<pubDate>Fri, 03 Aug 2012 06:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-4801</guid>
		<description>Had a similar experience the other day where I were accidentally comparing a string with an integer (i simply forgot to put ticks around the number when I did the query) which meant that for every single row MSSQL were converting the string to a integer. I looked at the query plans, everything looked as it should - that really made me scratch my head until one of the 
database gurus in my company helped me find the error simple as it were.</description>
		<content:encoded><![CDATA[<p>Had a similar experience the other day where I were accidentally comparing a string with an integer (i simply forgot to put ticks around the number when I did the query) which meant that for every single row MSSQL were converting the string to a integer. I looked at the query plans, everything looked as it should &#8211; that really made me scratch my head until one of the <br />
database gurus in my company helped me find the error simple as it were.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Banner</title>
		<link>http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-4710</link>
		<dc:creator>James Banner</dc:creator>
		<pubDate>Fri, 20 Jul 2012 05:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-4710</guid>
		<description>Awesome post, I didn&#039;t knew it, learned something new.

Just goes to show the software engineer&#039;s dream to &quot;hide&quot; complexities or to make &quot;persistence ignorance&quot; as far as database goes is just a pipe dream which we can live in, until a problem comes knocking.</description>
		<content:encoded><![CDATA[<p>Awesome post, I didn&#8217;t knew it, learned something new.</p>
<p>Just goes to show the software engineer&#8217;s dream to &#8220;hide&#8221; complexities or to make &#8220;persistence ignorance&#8221; as far as database goes is just a pipe dream which we can live in, until a problem comes knocking.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael K. Campell</title>
		<link>http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-4708</link>
		<dc:creator>Michael K. Campell</dc:creator>
		<pubDate>Thu, 19 Jul 2012 20:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-4708</guid>
		<description>Jimmy, this is a text-book example of a problem that DBAs and perf gurus typically call data-type coercion - where data-type mismatches (as you clearly outlined) invalidate the use of an index. 

And, as an FYI, you can EVEN run into this in situations where the column is, say, nvarchar(20), and @p1 is defined as nvarchar(10) - because you&#039;ll run into the same problem with coercion. </description>
		<content:encoded><![CDATA[<p>Jimmy, this is a text-book example of a problem that DBAs and perf gurus typically call data-type coercion &#8211; where data-type mismatches (as you clearly outlined) invalidate the use of an index. </p>
<p>And, as an FYI, you can EVEN run into this in situations where the column is, say, nvarchar(20), and @p1 is defined as nvarchar(10) &#8211; because you&#8217;ll run into the same problem with coercion. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-4706</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Thu, 19 Jul 2012 13:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-4706</guid>
		<description>Ha! What&#039;s the alternative?</description>
		<content:encoded><![CDATA[<p>Ha! What&#8217;s the alternative?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrei Rinea</title>
		<link>http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-4705</link>
		<dc:creator>Andrei Rinea</dc:creator>
		<pubDate>Thu, 19 Jul 2012 13:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-4705</guid>
		<description>That&#039;s why I hate ORMs. They solve n problems and create n+1.</description>
		<content:encoded><![CDATA[<p>That&#8217;s why I hate ORMs. They solve n problems and create n+1.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: My Java Coding Still Has A Problem? &#124; cheap airfare flights, cheap airline tickets, cheap package vacation deals</title>
		<link>http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-4704</link>
		<dc:creator>My Java Coding Still Has A Problem? &#124; cheap airfare flights, cheap airline tickets, cheap package vacation deals</dc:creator>
		<pubDate>Thu, 19 Jul 2012 09:59:16 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-4704</guid>
		<description>[...] bounds. You gotta a least post relevant code to get help! Give your answer to this question below! Question by : My Java Coding Still Has A Problem? import java.util.Scanner ; public class Flight_Ti...H, F, T, Q, Type, Z; System.out.print(&quot;ttttWelcome To ZulDin Flight&quot;); [...]</description>
		<content:encoded><![CDATA[<p>[...] bounds. You gotta a least post relevant code to get help! Give your answer to this question below! Question by : My Java Coding Still Has A Problem? import java.util.Scanner ; public class Flight_Ti&#8230;H, F, T, Q, Type, Z; System.out.print(&quot;ttttWelcome To ZulDin Flight&quot;); [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Morning Brew - Chris Alcock &#187; The Morning Brew #1149</title>
		<link>http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-4703</link>
		<dc:creator>The Morning Brew - Chris Alcock &#187; The Morning Brew #1149</dc:creator>
		<pubDate>Thu, 19 Jul 2012 08:29:14 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-4703</guid>
		<description>[...] Troubleshooting SQL index performance on varchar columns - Jimmy Bogard discusses an interesting performance problem he encountered with indexes and the use of an ORM caused by a difference in data type (ANSI vs Unicode). Definatly one to be aware of. [...]</description>
		<content:encoded><![CDATA[<p>[...] Troubleshooting SQL index performance on varchar columns &#8211; Jimmy Bogard discusses an interesting performance problem he encountered with indexes and the use of an ORM caused by a difference in data type (ANSI vs Unicode). Definatly one to be aware of. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Larry Silverman</title>
		<link>http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-4701</link>
		<dc:creator>Larry Silverman</dc:creator>
		<pubDate>Thu, 19 Jul 2012 03:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://lostechies.com/jimmybogard/2012/07/18/troubleshooting-sql-index-performance-on-varchar-columns/#comment-4701</guid>
		<description>Hi, Jimmy. Are you using Enterprise Edition? If so, you can enable data compression and use Unicode for simplicity and consistency everywhere.</description>
		<content:encoded><![CDATA[<p>Hi, Jimmy. Are you using Enterprise Edition? If so, you can enable data compression and use Unicode for simplicity and consistency everywhere.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
