<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.5" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: my query is not using my index</title>
	<link>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html</link>
	<description>Oracle Certified Master</description>
	<pubDate>Sun, 07 Sep 2008 06:07:29 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>

	<item>
		<title>by: Laurent Schneider</title>
		<link>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5614</link>
		<pubDate>Sat, 15 Dec 2007 06:53:00 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5614</guid>
					<description>Sure, I would love to speak Chinese, I did got help on that one :-D</description>
		<content:encoded><![CDATA[<p>Sure, I would love to speak Chinese, I did got help on that one <img src='http://laurentschneider.com/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Kamus</title>
		<link>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5610</link>
		<pubDate>Fri, 14 Dec 2007 17:55:52 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5610</guid>
					<description>@Laurent
I found this in in your site:
Language :
    * French
    * German
    * English
    * 在家,我不说英语
The last row is Chinese, so I think ....</description>
		<content:encoded><![CDATA[<p>@Laurent<br />
I found this in in your site:<br />
Language :<br />
    * French<br />
    * German<br />
    * English<br />
    * 在家,我不说英语<br />
The last row is Chinese, so I think &#8230;.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Laurent Schneider</title>
		<link>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5609</link>
		<pubDate>Fri, 14 Dec 2007 17:40:36 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5609</guid>
					<description>No, I cannot speak Chinese neither and my wife speaks Bakossi ;-)

Anyway, nice to know you too :!:</description>
		<content:encoded><![CDATA[<p>No, I cannot speak Chinese neither and my wife speaks Bakossi <img src='http://laurentschneider.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Anyway, nice to know you too  <img src='http://laurentschneider.com/wordpress/wp-includes/images/smilies/icon_exclaim.gif' alt=':!:' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Kamus</title>
		<link>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5608</link>
		<pubDate>Fri, 14 Dec 2007 17:17:50 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5608</guid>
					<description>@Laurent
so ... you just can speak Chinese? same as Eddie Awad, has a wife who make you speak Chinese? lol
anyway, nice 2 cu</description>
		<content:encoded><![CDATA[<p>@Laurent<br />
so &#8230; you just can speak Chinese? same as Eddie Awad, has a wife who make you speak Chinese? lol<br />
anyway, nice 2 cu
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Laurent Schneider</title>
		<link>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5607</link>
		<pubDate>Fri, 14 Dec 2007 16:47:52 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5607</guid>
					<description>LOL, I managed to register on itpub.net, but it is pure luck because I cannot read Chinese 8-)
&lt;a href="http://www.itpub.net/viewpro.php?uid=11252990" rel="nofollow"&gt;my itpub profile&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>LOL, I managed to register on itpub.net, but it is pure luck because I cannot read Chinese <img src='http://laurentschneider.com/wordpress/wp-includes/images/smilies/icon_cool.gif' alt='8-)' class='wp-smiley' /><br />
<a href="http://www.itpub.net/viewpro.php?uid=11252990" rel="nofollow">my itpub profile</a>
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Kamus</title>
		<link>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5605</link>
		<pubDate>Fri, 14 Dec 2007 15:42:08 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5605</guid>
					<description>Laurent,

It seems you good at Chinese, so ... maybe you wanna meet some Oracle ACE from China. or you can visit our biggest oracle forum in China www.itpub.net

I'm an Oracle ACE from Oracle corp. in China.

Laurent,
意外发现你的blog，似乎你是懂得中文的，因此，也许你愿意认识更多来自中国的Oracle ACE。我们在维护全中国最大的Oracle论坛www.itpub.net。非常高兴认识你。</description>
		<content:encoded><![CDATA[<p>Laurent,</p>
<p>It seems you good at Chinese, so &#8230; maybe you wanna meet some Oracle ACE from China. or you can visit our biggest oracle forum in China <a href="http://www.itpub.net" rel="nofollow">www.itpub.net</a></p>
<p>I&#8217;m an Oracle ACE from Oracle corp. in China.</p>
<p>Laurent,<br />
意外发现你的blog，似乎你是懂得中文的，因此，也许你愿意认识更多来自中国的Oracle ACE。我们在维护全中国最大的Oracle论坛www.itpub.net。非常高兴认识你。
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Coskan</title>
		<link>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5599</link>
		<pubDate>Thu, 13 Dec 2007 17:06:49 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5599</guid>
					<description>@Garry 

You get the index fast full scan because of the coumns you select. 

If you select r and t columns together you would probably get full table scan

but when you just select r column CBO thinks that it is better to go index because selected columns are already indexed.</description>
		<content:encoded><![CDATA[<p>@Garry </p>
<p>You get the index fast full scan because of the coumns you select. </p>
<p>If you select r and t columns together you would probably get full table scan</p>
<p>but when you just select r column CBO thinks that it is better to go index because selected columns are already indexed.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: CJ</title>
		<link>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5598</link>
		<pubDate>Thu, 13 Dec 2007 16:47:27 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5598</guid>
					<description>Interesting that CBO doesn't consider cost in the SELECT statement in the above example, but seems to consider it in the UPDATE statement given below:

UPDATE t SET r = NULL WHERE r != 1;

The plan should give an indexed full scan directly without hinting etc.

Not sure if this behaviour changes in 11g, because I don't see why the optimizer should ignore costs in the SELECT statement.

Regards,
Charu.</description>
		<content:encoded><![CDATA[<p>Interesting that CBO doesn&#8217;t consider cost in the SELECT statement in the above example, but seems to consider it in the UPDATE statement given below:</p>
<p>UPDATE t SET r = NULL WHERE r != 1;</p>
<p>The plan should give an indexed full scan directly without hinting etc.</p>
<p>Not sure if this behaviour changes in 11g, because I don&#8217;t see why the optimizer should ignore costs in the SELECT statement.</p>
<p>Regards,<br />
Charu.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Gary</title>
		<link>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5589</link>
		<pubDate>Tue, 11 Dec 2007 19:29:07 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5589</guid>
					<description>With XE and 
dbms_stats.gather_table_stats(user,'T',cascade=&#62;true,
method_opt=&#62;'for all columns size skewonly');

I could get an INDEX FAST FULL SCAN/INDEX RANGE SCAN use with
select r,t from t where r in (select r from t where r!=1);

But it does look like that the optimizer won't got for the best plan for the plain query without a hint.</description>
		<content:encoded><![CDATA[<p>With XE and<br />
dbms_stats.gather_table_stats(user,&#8217;T',cascade=&gt;true,<br />
method_opt=&gt;&#8217;for all columns size skewonly&#8217;);</p>
<p>I could get an INDEX FAST FULL SCAN/INDEX RANGE SCAN use with<br />
select r,t from t where r in (select r from t where r!=1);</p>
<p>But it does look like that the optimizer won&#8217;t got for the best plan for the plain query without a hint.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Laurent Schneider</title>
		<link>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5588</link>
		<pubDate>Tue, 11 Dec 2007 15:21:51 +0000</pubDate>
		<guid>http://laurentschneider.com/wordpress/2007/12/my-query-is-not-using-my-index.html#comment-5588</guid>
					<description>@Jens : yes, I should have written that CONNECT BY PRIOR is not supported 8-) but it was so easy to generate 1 million rows... unfortunately I did it with system as default tablespace and my system tablespace was suddenly 12 Gb... 

@Don : I rewrite your message because this stupid wordpress engine expect you to write &#38;lt; and not &#60; :-( well, the case is different as I am not using count (where full table scan is used), but I select also a non-index column and I want a TABLE ACCESS BY INDEX ROWID (that I did get only with a hint)</description>
		<content:encoded><![CDATA[<p>@Jens : yes, I should have written that CONNECT BY PRIOR is not supported <img src='http://laurentschneider.com/wordpress/wp-includes/images/smilies/icon_cool.gif' alt='8-)' class='wp-smiley' />  but it was so easy to generate 1 million rows&#8230; unfortunately I did it with system as default tablespace and my system tablespace was suddenly 12 Gb&#8230; </p>
<p>@Don : I rewrite your message because this stupid wordpress engine expect you to write &amp;lt; and not &lt; <img src='http://laurentschneider.com/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  well, the case is different as I am not using count (where full table scan is used), but I select also a non-index column and I want a TABLE ACCESS BY INDEX ROWID (that I did get only with a hint)
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
