<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: What is the Difference Between the FIRST_ROWS Hint and ROWNUM in the WHERE Clause?</title>
	<atom:link href="http://hoopercharles.wordpress.com/2011/03/10/what-is-the-difference-between-the-first_rows-hint-and-rownum-in-the-where-clause/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoopercharles.wordpress.com/2011/03/10/what-is-the-difference-between-the-first_rows-hint-and-rownum-in-the-where-clause/</link>
	<description>Miscellaneous Random Oracle Topics: Stop, Think, ... Understand</description>
	<lastBuildDate>Thu, 23 May 2013 04:02:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/03/10/what-is-the-difference-between-the-first_rows-hint-and-rownum-in-the-where-clause/#comment-2952</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Wed, 16 Mar 2011 09:35:04 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4633#comment-2952</guid>
		<description><![CDATA[Narendra,

It is true that the comments in this article have drifted a bit from the original content of the article, but it has been an interesting conversation.  In case it is not obvious to the casual reader of this blog, I think that I should point out that you have made excellent points in your comments.  It would be interesting to see any insight that Jonathan or someone else could provide regarding the frequency of &quot;db file scattered read&quot; waits during index range scan operations - in my experience those operations appear to be infrequently used in the older Oracle Database release versions, but seem to be more common in more recent releases.]]></description>
		<content:encoded><![CDATA[<p>Narendra,</p>
<p>It is true that the comments in this article have drifted a bit from the original content of the article, but it has been an interesting conversation.  In case it is not obvious to the casual reader of this blog, I think that I should point out that you have made excellent points in your comments.  It would be interesting to see any insight that Jonathan or someone else could provide regarding the frequency of &#8220;db file scattered read&#8221; waits during index range scan operations &#8211; in my experience those operations appear to be infrequently used in the older Oracle Database release versions, but seem to be more common in more recent releases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Narendra</title>
		<link>http://hoopercharles.wordpress.com/2011/03/10/what-is-the-difference-between-the-first_rows-hint-and-rownum-in-the-where-clause/#comment-2949</link>
		<dc:creator><![CDATA[Narendra]]></dc:creator>
		<pubDate>Tue, 15 Mar 2011 12:27:27 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4633#comment-2949</guid>
		<description><![CDATA[Charles,

Two things about the Jonathan&#039;s blog post that you have mentioned
1) It is dated 15th December 2006. Lots of things might have changed since (but it may still be valid). Just trying to read things in context of the time (as Jonathan himself says)
2) In the 2nd comment, Jonathan himself claims that it is his assumption, which was not proved then
As I said earlier, it was more of a &quot;conventional wisdom&quot; to say that Table Access By index range scan would (typically) cause &quot;DB File Sequential Reads&quot; waits. There would
always be cases where &quot;DB File Scattered Read&quot; waits would be observed but my understanding is it would be safe to treat such cases as exceptions (handled internally by Oracle) rather than rules.
I think I have managed to significantly divert the discussion from the topic of your original blog post so apologies for that.]]></description>
		<content:encoded><![CDATA[<p>Charles,</p>
<p>Two things about the Jonathan&#8217;s blog post that you have mentioned<br />
1) It is dated 15th December 2006. Lots of things might have changed since (but it may still be valid). Just trying to read things in context of the time (as Jonathan himself says)<br />
2) In the 2nd comment, Jonathan himself claims that it is his assumption, which was not proved then<br />
As I said earlier, it was more of a &#8220;conventional wisdom&#8221; to say that Table Access By index range scan would (typically) cause &#8220;DB File Sequential Reads&#8221; waits. There would<br />
always be cases where &#8220;DB File Scattered Read&#8221; waits would be observed but my understanding is it would be safe to treat such cases as exceptions (handled internally by Oracle) rather than rules.<br />
I think I have managed to significantly divert the discussion from the topic of your original blog post so apologies for that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/03/10/what-is-the-difference-between-the-first_rows-hint-and-rownum-in-the-where-clause/#comment-2948</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Tue, 15 Mar 2011 11:09:33 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4633#comment-2948</guid>
		<description><![CDATA[Timur,
Thank you for pointing out &quot;logical&quot; and &quot;physical&quot; regarding the term &quot;adjacent&quot;.

Narendra,
Shortly after I posted my comment I thought about adding a couple of clarifications - my comment above might appear to be a little too harsh, essentially stating: &quot;It happens this way, end of discussion.&quot;  There is a lot that I still do not understand about Oracle Database, so it is not my intention to say &quot;End of discussion.&quot;  With my test case that I linked to above, you may see different results when testing different Oracle Database release versions or Standard/Enterprise edition (I saw db file sequential read waits on 10.2.0.2 Standard Edition).

I agree with you that the documentation link that I provided does not distinguish between adjacent and non-adjacent blocks when describing the &quot;db file parallel read&quot; wait event.  Just because I said that something is true (in part 1 of the article series linked to in my previous comment) does not necessarily mean that it is true.  However, a search of the Internet finds some agreement with my suggestion (disclaimer: I might have learned of this fact from this article), take a look at the article and the comments attached: http://jonathanlewis.wordpress.com/2006/12/15/index-operations/]]></description>
		<content:encoded><![CDATA[<p>Timur,<br />
Thank you for pointing out &#8220;logical&#8221; and &#8220;physical&#8221; regarding the term &#8220;adjacent&#8221;.</p>
<p>Narendra,<br />
Shortly after I posted my comment I thought about adding a couple of clarifications &#8211; my comment above might appear to be a little too harsh, essentially stating: &#8220;It happens this way, end of discussion.&#8221;  There is a lot that I still do not understand about Oracle Database, so it is not my intention to say &#8220;End of discussion.&#8221;  With my test case that I linked to above, you may see different results when testing different Oracle Database release versions or Standard/Enterprise edition (I saw db file sequential read waits on 10.2.0.2 Standard Edition).</p>
<p>I agree with you that the documentation link that I provided does not distinguish between adjacent and non-adjacent blocks when describing the &#8220;db file parallel read&#8221; wait event.  Just because I said that something is true (in part 1 of the article series linked to in my previous comment) does not necessarily mean that it is true.  However, a search of the Internet finds some agreement with my suggestion (disclaimer: I might have learned of this fact from this article), take a look at the article and the comments attached: <a href="http://jonathanlewis.wordpress.com/2006/12/15/index-operations/" rel="nofollow">http://jonathanlewis.wordpress.com/2006/12/15/index-operations/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Narendra</title>
		<link>http://hoopercharles.wordpress.com/2011/03/10/what-is-the-difference-between-the-first_rows-hint-and-rownum-in-the-where-clause/#comment-2947</link>
		<dc:creator><![CDATA[Narendra]]></dc:creator>
		<pubDate>Tue, 15 Mar 2011 10:10:41 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4633#comment-2947</guid>
		<description><![CDATA[Timur,

You remind me once again about the importance of making a complete (and correct) statement. Thanks for that.
I think I wanted to say that when a table is accessed using an index range scan, the conventional wisdom said table blocks will
be read one-block-at-a-time (and hence might result in &quot;DB File Sequential Read&quot; waits). I think from 9i onwards, CBO was enhanced
to perform multiple single-block reads for a table (resulting from indexed range scan) in parallel, instead of accessing single (table) blocks (adjacent or not)
in a serial manner. I think Tom (as always) explains it nicely &lt;a href=&quot;http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:7110065183012#2715565100346286384&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;]]></description>
		<content:encoded><![CDATA[<p>Timur,</p>
<p>You remind me once again about the importance of making a complete (and correct) statement. Thanks for that.<br />
I think I wanted to say that when a table is accessed using an index range scan, the conventional wisdom said table blocks will<br />
be read one-block-at-a-time (and hence might result in &#8220;DB File Sequential Read&#8221; waits). I think from 9i onwards, CBO was enhanced<br />
to perform multiple single-block reads for a table (resulting from indexed range scan) in parallel, instead of accessing single (table) blocks (adjacent or not)<br />
in a serial manner. I think Tom (as always) explains it nicely <a href="http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:7110065183012#2715565100346286384" rel="nofollow">here</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Narendra</title>
		<link>http://hoopercharles.wordpress.com/2011/03/10/what-is-the-difference-between-the-first_rows-hint-and-rownum-in-the-where-clause/#comment-2946</link>
		<dc:creator><![CDATA[Narendra]]></dc:creator>
		<pubDate>Tue, 15 Mar 2011 10:01:11 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4633#comment-2946</guid>
		<description><![CDATA[Charles,

I did not intend to say it never happens. My point was about whether it is deterministic enough to make a generic statement.
I know very little about how CBO works and things change with each oracle version. During the OTN forum discussion that I had mentioned above,
I was not able to reproduce the behaviour with a couple of oracle versions. I will certainly see if I can reproduce the results with your test case.
BTW, I might have missed it but the documentation link that you have provided does not appear to make any reference to blocks being adjacent or not.]]></description>
		<content:encoded><![CDATA[<p>Charles,</p>
<p>I did not intend to say it never happens. My point was about whether it is deterministic enough to make a generic statement.<br />
I know very little about how CBO works and things change with each oracle version. During the OTN forum discussion that I had mentioned above,<br />
I was not able to reproduce the behaviour with a couple of oracle versions. I will certainly see if I can reproduce the results with your test case.<br />
BTW, I might have missed it but the documentation link that you have provided does not appear to make any reference to blocks being adjacent or not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timur Akhmadeev</title>
		<link>http://hoopercharles.wordpress.com/2011/03/10/what-is-the-difference-between-the-first_rows-hint-and-rownum-in-the-where-clause/#comment-2945</link>
		<dc:creator><![CDATA[Timur Akhmadeev]]></dc:creator>
		<pubDate>Tue, 15 Mar 2011 08:26:02 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4633#comment-2945</guid>
		<description><![CDATA[&lt;blockquote&gt;The “db file parallel read” wait event will appear when multiple non-adjacent blocks are read during a prefetch operation&lt;/blockquote&gt;
Although I&#039;m not Narendra, I think by &quot;adjacent index blocks&quot; he means &quot;the blocks which are logically adjacent in the index structure&quot;. So, they are read in parallel by process - it simply picks up ROWIDs of index blocks from a branch block and issues one request to access them all (maybe not all, I don&#039;t know in-depth details).]]></description>
		<content:encoded><![CDATA[<blockquote><p>The “db file parallel read” wait event will appear when multiple non-adjacent blocks are read during a prefetch operation</p></blockquote>
<p>Although I&#8217;m not Narendra, I think by &#8220;adjacent index blocks&#8221; he means &#8220;the blocks which are logically adjacent in the index structure&#8221;. So, they are read in parallel by process &#8211; it simply picks up ROWIDs of index blocks from a branch block and issues one request to access them all (maybe not all, I don&#8217;t know in-depth details).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/03/10/what-is-the-difference-between-the-first_rows-hint-and-rownum-in-the-where-clause/#comment-2944</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Mon, 14 Mar 2011 18:37:53 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4633#comment-2944</guid>
		<description><![CDATA[Narendra,

The &quot;db file parallel read&quot; wait event will appear when multiple non-adjacent blocks are read during a prefetch operation, see the documentation:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/waitevents003.htm#sthref3022

I think in that article Timur simply stated that he could not reproduce the results on a particular version - I believe that I had the same problem with the test case when I tried to produce the results on Oracle Database 10.2.0.2 Standard Edition.  However, that does not mean that a db file scattered read operation cannot be used to read index blocks.  You can see an example of that happening roughly half way through this article, as partially shown below:
http://hoopercharles.wordpress.com/2010/11/21/different-performance-from-standard-edition-and-enterprise-edition-2/
Standard Edition (obj# 20275 is the table T1, obj# 20276 is the index):
&lt;pre&gt;
PARSE #2:c=15600,e=17980,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,plh=2892477391,tim=176265018485
EXEC #2:c=0,e=24,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=2892477391,tim=176265018563
WAIT #2: nam=&#039;SQL*Net message to client&#039; ela= 2 driver id=1413697536 #bytes=1 p3=0 obj#=0 tim=176265018598
WAIT #2: nam=&#039;db file scattered read&#039; ela= 76 file#=8 block#=8320 blocks=8 obj#=20276 tim=176265018735
WAIT #2: nam=&#039;db file scattered read&#039; ela= 19381 file#=8 block#=8648 blocks=8 obj#=20276 tim=176265038168
WAIT #2: nam=&#039;db file scattered read&#039; ela= 102 file#=8 block#=8344 blocks=8 obj#=20276 tim=176265038360
WAIT #2: nam=&#039;db file scattered read&#039; ela= 98 file#=7 block#=3200 blocks=8 obj#=20275 tim=176265038517
&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>Narendra,</p>
<p>The &#8220;db file parallel read&#8221; wait event will appear when multiple non-adjacent blocks are read during a prefetch operation, see the documentation:<br />
<a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/waitevents003.htm#sthref3022" rel="nofollow">http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/waitevents003.htm#sthref3022</a></p>
<p>I think in that article Timur simply stated that he could not reproduce the results on a particular version &#8211; I believe that I had the same problem with the test case when I tried to produce the results on Oracle Database 10.2.0.2 Standard Edition.  However, that does not mean that a db file scattered read operation cannot be used to read index blocks.  You can see an example of that happening roughly half way through this article, as partially shown below:<br />
<a href="http://hoopercharles.wordpress.com/2010/11/21/different-performance-from-standard-edition-and-enterprise-edition-2/" rel="nofollow">http://hoopercharles.wordpress.com/2010/11/21/different-performance-from-standard-edition-and-enterprise-edition-2/</a><br />
Standard Edition (obj# 20275 is the table T1, obj# 20276 is the index):</p>
<pre>
PARSE #2:c=15600,e=17980,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,plh=2892477391,tim=176265018485
EXEC #2:c=0,e=24,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=2892477391,tim=176265018563
WAIT #2: nam='SQL*Net message to client' ela= 2 driver id=1413697536 #bytes=1 p3=0 obj#=0 tim=176265018598
WAIT #2: nam='db file scattered read' ela= 76 file#=8 block#=8320 blocks=8 obj#=20276 tim=176265018735
WAIT #2: nam='db file scattered read' ela= 19381 file#=8 block#=8648 blocks=8 obj#=20276 tim=176265038168
WAIT #2: nam='db file scattered read' ela= 102 file#=8 block#=8344 blocks=8 obj#=20276 tim=176265038360
WAIT #2: nam='db file scattered read' ela= 98 file#=7 block#=3200 blocks=8 obj#=20275 tim=176265038517
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Narendra</title>
		<link>http://hoopercharles.wordpress.com/2011/03/10/what-is-the-difference-between-the-first_rows-hint-and-rownum-in-the-where-clause/#comment-2943</link>
		<dc:creator><![CDATA[Narendra]]></dc:creator>
		<pubDate>Mon, 14 Mar 2011 17:35:22 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4633#comment-2943</guid>
		<description><![CDATA[Charles,
I believe Timur&#039;s test case was specific to a particular version (10.2.0.3) and it could not be reproduced in different versions in a deterministic manner.
In fact, Timur&#039;s test case was also referenced in another discussion (see http://forums.oracle.com/forums/thread.jspa?messageID=4581053#4581053 )
where he has acknowledged the issue. It makes more sense to say that the read of adjacent index blocks would result in &quot;DB File Parallel Read&quot; and
not &quot;DB File Scattered Read&quot;.]]></description>
		<content:encoded><![CDATA[<p>Charles,<br />
I believe Timur&#8217;s test case was specific to a particular version (10.2.0.3) and it could not be reproduced in different versions in a deterministic manner.<br />
In fact, Timur&#8217;s test case was also referenced in another discussion (see <a href="http://forums.oracle.com/forums/thread.jspa?messageID=4581053#4581053" rel="nofollow">http://forums.oracle.com/forums/thread.jspa?messageID=4581053#4581053</a> )<br />
where he has acknowledged the issue. It makes more sense to say that the read of adjacent index blocks would result in &#8220;DB File Parallel Read&#8221; and<br />
not &#8220;DB File Scattered Read&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/03/10/what-is-the-difference-between-the-first_rows-hint-and-rownum-in-the-where-clause/#comment-2942</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Mon, 14 Mar 2011 12:47:20 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4633#comment-2942</guid>
		<description><![CDATA[If the optimizer parameters and system (CPU) statistics tell the optimizer that index access paths are very inexpensive, you very well could see the execution plan change from a full table scan to an index range scan.  Note that you posted TKPROF for the execution which shows the *actual* execution plan, while I posted the autotrace generated explain plan output which may not show the actual execution plan.  Note that there is a risk that TKPROF in 11.1.0.6 *could* potentially display the wrong execution plan, if there are multiple execution plans in the trace file for the same SQL statement - see the following article for a demonstration:
http://hoopercharles.wordpress.com/2010/01/11/explain-plan-lies-autotrace-lies-tkprof-lies-what-is-the-plan/

I suggest reviewing the raw trace file to see why db file scattered reads were used during the execution.  I suspect that you will find that many of those reads were used to fetch the table blocks (as indicated by the statistics) but could also be used to quickly read adjacent index blocks.  See the comments and test case by Timur Akhmadeev in this thread for a demonstration of db file scattered read waits appearing during an index range scan:
http://forums.oracle.com/forums/thread.jspa?threadID=941864&amp;tstart=0]]></description>
		<content:encoded><![CDATA[<p>If the optimizer parameters and system (CPU) statistics tell the optimizer that index access paths are very inexpensive, you very well could see the execution plan change from a full table scan to an index range scan.  Note that you posted TKPROF for the execution which shows the *actual* execution plan, while I posted the autotrace generated explain plan output which may not show the actual execution plan.  Note that there is a risk that TKPROF in 11.1.0.6 *could* potentially display the wrong execution plan, if there are multiple execution plans in the trace file for the same SQL statement &#8211; see the following article for a demonstration:<br />
<a href="http://hoopercharles.wordpress.com/2010/01/11/explain-plan-lies-autotrace-lies-tkprof-lies-what-is-the-plan/" rel="nofollow">http://hoopercharles.wordpress.com/2010/01/11/explain-plan-lies-autotrace-lies-tkprof-lies-what-is-the-plan/</a></p>
<p>I suggest reviewing the raw trace file to see why db file scattered reads were used during the execution.  I suspect that you will find that many of those reads were used to fetch the table blocks (as indicated by the statistics) but could also be used to quickly read adjacent index blocks.  See the comments and test case by Timur Akhmadeev in this thread for a demonstration of db file scattered read waits appearing during an index range scan:<br />
<a href="http://forums.oracle.com/forums/thread.jspa?threadID=941864&#038;tstart=0" rel="nofollow">http://forums.oracle.com/forums/thread.jspa?threadID=941864&#038;tstart=0</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ghassem koolivand</title>
		<link>http://hoopercharles.wordpress.com/2011/03/10/what-is-the-difference-between-the-first_rows-hint-and-rownum-in-the-where-clause/#comment-2941</link>
		<dc:creator><![CDATA[ghassem koolivand]]></dc:creator>
		<pubDate>Mon, 14 Mar 2011 08:52:38 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4633#comment-2941</guid>
		<description><![CDATA[Hi Charles
This article is great and I have tried to test it in my lab. My oracle version is 11.1.0.6
When I run your example I saw a wonderful result:

********************************************************************************
&lt;pre&gt;
SELECT /*+  */
  *
FROM
  (SELECT
    C1,
    C2,
    MAX(C3) C3
  FROM
    T1
  GROUP BY
    C1,
    C2
  ORDER BY
    C1,
    C2)
WHERE
  C1 BETWEEN 10000 AND 100000

call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch       91      0.31       0.78       1440       1354          0       90001
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total       93      0.31       0.78       1440       1354          0       90001

Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 82  

Rows     Row Source Operation
-------  ---------------------------------------------------
  90001  VIEW  (cr=1354 pr=1440 pw=1440 time=4321 us cost=2004 size=3510078 card=90002)
  90001   SORT GROUP BY (cr=1354 pr=1440 pw=1440 time=1546 us cost=2004 size=2250050 card=90002)
  90001    TABLE ACCESS BY INDEX ROWID T1 (cr=1354 pr=1440 pw=1440 time=14292 us cost=1353 size=2250050 card=90002)
  90001     INDEX RANGE SCAN SYS_C009411 (cr=172 pr=224 pw=224 time=1731 us cost=172 size=0 card=90002)(object id 69857)


Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  SQL*Net message to client                      92        0.00          0.00
  SQL*Net message from client                    92        8.11        474.46
  db file scattered read                        180        0.03          0.58
  SQL*Net more data to client                     1        0.00          0.00
&lt;/pre&gt;

The first one is why we are seeing “TABLE ACCESS BY INDEX ROWID” instead “TABLE FULE SCAN” ???
And second one is why we are seeing “db file scattered read” instead “db file sequential read”?
I’m appreciating to help me.
Ghassem]]></description>
		<content:encoded><![CDATA[<p>Hi Charles<br />
This article is great and I have tried to test it in my lab. My oracle version is 11.1.0.6<br />
When I run your example I saw a wonderful result:</p>
<p>********************************************************************************</p>
<pre>
SELECT /*+  */
  *
FROM
  (SELECT
    C1,
    C2,
    MAX(C3) C3
  FROM
    T1
  GROUP BY
    C1,
    C2
  ORDER BY
    C1,
    C2)
WHERE
  C1 BETWEEN 10000 AND 100000

call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.00          0          0          0           0
Execute      1      0.00       0.00          0          0          0           0
Fetch       91      0.31       0.78       1440       1354          0       90001
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total       93      0.31       0.78       1440       1354          0       90001

Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 82  

Rows     Row Source Operation
-------  ---------------------------------------------------
  90001  VIEW  (cr=1354 pr=1440 pw=1440 time=4321 us cost=2004 size=3510078 card=90002)
  90001   SORT GROUP BY (cr=1354 pr=1440 pw=1440 time=1546 us cost=2004 size=2250050 card=90002)
  90001    TABLE ACCESS BY INDEX ROWID T1 (cr=1354 pr=1440 pw=1440 time=14292 us cost=1353 size=2250050 card=90002)
  90001     INDEX RANGE SCAN SYS_C009411 (cr=172 pr=224 pw=224 time=1731 us cost=172 size=0 card=90002)(object id 69857)


Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  SQL*Net message to client                      92        0.00          0.00
  SQL*Net message from client                    92        8.11        474.46
  db file scattered read                        180        0.03          0.58
  SQL*Net more data to client                     1        0.00          0.00
</pre>
<p>The first one is why we are seeing “TABLE ACCESS BY INDEX ROWID” instead “TABLE FULE SCAN” ???<br />
And second one is why we are seeing “db file scattered read” instead “db file sequential read”?<br />
I’m appreciating to help me.<br />
Ghassem</p>
]]></content:encoded>
	</item>
</channel>
</rss>
