<?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: Why Index could refuse to work ?</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/</link>
	<description>Everything about MySQL Performance</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:23:57 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/comment-page-1/#comment-586680</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Tue, 16 Jun 2009 03:55:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/#comment-586680</guid>
		<description>Pete,

This may happen if MySQL can&#039;t use this index for the query.
FORCE INDEX only works if it is possible to use index but MySQL choses not to do that.</description>
		<content:encoded><![CDATA[<p>Pete,</p>
<p>This may happen if MySQL can&#8217;t use this index for the query.<br />
FORCE INDEX only works if it is possible to use index but MySQL choses not to do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Mouland</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/comment-page-1/#comment-585952</link>
		<dc:creator>Peter Mouland</dc:creator>
		<pubDate>Mon, 15 Jun 2009 10:11:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/#comment-585952</guid>
		<description>Hi, any other reasons why FORCE INDEX is ignored? I have a table with 100 columns which about 25% are integers and most of those have indexes on them.  A varchar column is being used as to left join to another table which also has an (btree) index on it, but for some reason it is not being used.  EXPLAIN also doesn&#039;t tell me about any possible keys.  The table has about 100,000 rows, so not huge but be steadily growing. any ideas?? thanks,pete</description>
		<content:encoded><![CDATA[<p>Hi, any other reasons why FORCE INDEX is ignored? I have a table with 100 columns which about 25% are integers and most of those have indexes on them.  A varchar column is being used as to left join to another table which also has an (btree) index on it, but for some reason it is not being used.  EXPLAIN also doesn&#8217;t tell me about any possible keys.  The table has about 100,000 rows, so not huge but be steadily growing. any ideas?? thanks,pete</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Suman</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/comment-page-1/#comment-482355</link>
		<dc:creator>Suman</dc:creator>
		<pubDate>Thu, 19 Feb 2009 13:50:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/#comment-482355</guid>
		<description>Sorry this has been answered above, I missed it.</description>
		<content:encoded><![CDATA[<p>Sorry this has been answered above, I missed it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Suman</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/comment-page-1/#comment-482353</link>
		<dc:creator>Suman</dc:creator>
		<pubDate>Thu, 19 Feb 2009 13:47:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/#comment-482353</guid>
		<description>What will happen if the table is:
      CREATE TABLE `article` (
      `article_id` int(5) NOT NULL,
      `dummy` varchar(255) NOT NULL DEFAULT &#039;dummy&#039;,
       PRIMARY KEY  (`article_id`)
      )
And query is: 
SELECT * FROM article force INDEX (PRIMARY) WHERE article_id=&#039;10&#039;; (single quotes)
Will the index be used?</description>
		<content:encoded><![CDATA[<p>What will happen if the table is:<br />
      CREATE TABLE `article` (<br />
      `article_id` int(5) NOT NULL,<br />
      `dummy` varchar(255) NOT NULL DEFAULT &#8216;dummy&#8217;,<br />
       PRIMARY KEY  (`article_id`)<br />
      )<br />
And query is:<br />
SELECT * FROM article force INDEX (PRIMARY) WHERE article_id=&#8217;10&#8242;; (single quotes)<br />
Will the index be used?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/comment-page-1/#comment-391436</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Tue, 25 Nov 2008 06:49:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/#comment-391436</guid>
		<description>Thank you, this is a great post. It just caught me in a system!</description>
		<content:encoded><![CDATA[<p>Thank you, this is a great post. It just caught me in a system!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 记录/分享/…… &#187; Blog Archive &#187; A Few Common Performance Mistakes</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/comment-page-1/#comment-249466</link>
		<dc:creator>记录/分享/…… &#187; Blog Archive &#187; A Few Common Performance Mistakes</dc:creator>
		<pubDate>Fri, 07 Mar 2008 01:37:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/#comment-249466</guid>
		<description>[...] http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/" rel="nofollow">http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Big DBA Head! - Database Brain Power! &#187; A Few Common Performance Mistakes</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/comment-page-1/#comment-249316</link>
		<dc:creator>Big DBA Head! - Database Brain Power! &#187; A Few Common Performance Mistakes</dc:creator>
		<pubDate>Thu, 06 Mar 2008 16:20:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/#comment-249316</guid>
		<description>[...] http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/" rel="nofollow">http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/comment-page-1/#comment-142336</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Tue, 03 Jul 2007 14:08:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/#comment-142336</guid>
		<description>No this one is actually fine,  because  there is only one number for given string &quot;10&quot; is 10   but it is not the case other way around  10 can correspond to &quot;10&quot;  &quot;010&quot; &quot;10.0&quot;  and a lot of other strings.</description>
		<content:encoded><![CDATA[<p>No this one is actually fine,  because  there is only one number for given string &#8220;10&#8243; is 10   but it is not the case other way around  10 can correspond to &#8220;10&#8243;  &#8220;010&#8243; &#8220;10.0&#8243;  and a lot of other strings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: parvesh</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/comment-page-1/#comment-142289</link>
		<dc:creator>parvesh</dc:creator>
		<pubDate>Tue, 03 Jul 2007 12:14:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/#comment-142289</guid>
		<description>Sorry for commenting on an old post. But recently, I saw another interesting thing. You are right about indexes not being used in this case, but it works the other way round. If the column is an integer and the query is something like 

SELECT * FROM article WHERE article_id=&quot;10&quot;;

My first intuition was that this will also fail, but MySQL is smart enough :)</description>
		<content:encoded><![CDATA[<p>Sorry for commenting on an old post. But recently, I saw another interesting thing. You are right about indexes not being used in this case, but it works the other way round. If the column is an integer and the query is something like </p>
<p>SELECT * FROM article WHERE article_id=&#8221;10&#8243;;</p>
<p>My first intuition was that this will also fail, but MySQL is smart enough <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/comment-page-1/#comment-2347</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Fri, 08 Sep 2006 19:25:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/09/08/why-index-could-refuse-to-work/#comment-2347</guid>
		<description>I did not mention it in the article but a lot of such problems also come from comparing incompatible columns, ie varchar to integer which may require closer look to figure out.     I would really like MySQL EXPLAIN to issue warning in such case or something similar so it is easier to track it down.

Yes this mistake is usually done by people having limited experience, at least with MySQL.</description>
		<content:encoded><![CDATA[<p>I did not mention it in the article but a lot of such problems also come from comparing incompatible columns, ie varchar to integer which may require closer look to figure out.     I would really like MySQL EXPLAIN to issue warning in such case or something similar so it is easier to track it down.</p>
<p>Yes this mistake is usually done by people having limited experience, at least with MySQL.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
