<?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: True or False &#8211; Direct Path Reads</title>
	<atom:link href="http://hoopercharles.wordpress.com/2010/04/21/true-or-false-direct-path-reads/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoopercharles.wordpress.com/2010/04/21/true-or-false-direct-path-reads/</link>
	<description>Miscellaneous Random Oracle Topics: Stop, Think, ... Understand</description>
	<lastBuildDate>Mon, 13 May 2013 14:10:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Roni Vered</title>
		<link>http://hoopercharles.wordpress.com/2010/04/21/true-or-false-direct-path-reads/#comment-3291</link>
		<dc:creator><![CDATA[Roni Vered]]></dc:creator>
		<pubDate>Wed, 01 Jun 2011 13:33:41 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=1937#comment-3291</guid>
		<description><![CDATA[I actually tried translating it before I&#039;ve sent the comment, but I found the translation far from satisfying, so I&#039;ve omitted this option :)
(although some times I read threads in Chinese - Oracle forums, when searching for a solution for various of issues, and then Google Translate is more than enough for the these needs).

We do have another database oriented site - www.dbsnaps.com, but as we&#039;re now concentrating with building the Israeli one, it wasn&#039;t updated much since the beginning of the year (It has many database HOW-TOs clips).

Anyway, thanks again, 
You have now a new follower for you site :)
Roni.]]></description>
		<content:encoded><![CDATA[<p>I actually tried translating it before I&#8217;ve sent the comment, but I found the translation far from satisfying, so I&#8217;ve omitted this option <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
(although some times I read threads in Chinese &#8211; Oracle forums, when searching for a solution for various of issues, and then Google Translate is more than enough for the these needs).</p>
<p>We do have another database oriented site &#8211; <a href="http://www.dbsnaps.com" rel="nofollow">http://www.dbsnaps.com</a>, but as we&#8217;re now concentrating with building the Israeli one, it wasn&#8217;t updated much since the beginning of the year (It has many database HOW-TOs clips).</p>
<p>Anyway, thanks again,<br />
You have now a new follower for you site <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Roni.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/04/21/true-or-false-direct-path-reads/#comment-3290</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Wed, 01 Jun 2011 13:14:44 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=1937#comment-3290</guid>
		<description><![CDATA[It appears that computers with the Google toolbar installed are offered an automatic translation from Hebrew to another language.
http://www.ildba.co.il/challange-of-the-month/challange-of-the-month-may-2011/

&lt;a href=&quot;http://translate.google.com/translate?js=n&amp;prev=_t&amp;hl=en&amp;ie=UTF-8&amp;layout=2&amp;eotf=1&amp;sl=iw&amp;tl=en&amp;u=http%3A%2F%2Fwww.ildba.co.il%2Fchallange-of-the-month%2Fchallange-of-the-month-may-2011%2F&amp;act=url&quot; rel=&quot;nofollow&quot;&gt;Google&#039;s Translate site&lt;/a&gt; also makes it possible to read the page with a left justified text, although code sections are problematic.]]></description>
		<content:encoded><![CDATA[<p>It appears that computers with the Google toolbar installed are offered an automatic translation from Hebrew to another language.<br />
<a href="http://www.ildba.co.il/challange-of-the-month/challange-of-the-month-may-2011/" rel="nofollow">http://www.ildba.co.il/challange-of-the-month/challange-of-the-month-may-2011/</a></p>
<p><a href="http://translate.google.com/translate?js=n&amp;prev=_t&amp;hl=en&amp;ie=UTF-8&amp;layout=2&amp;eotf=1&amp;sl=iw&amp;tl=en&amp;u=http%3A%2F%2Fwww.ildba.co.il%2Fchallange-of-the-month%2Fchallange-of-the-month-may-2011%2F&amp;act=url" rel="nofollow">Google&#8217;s Translate site</a> also makes it possible to read the page with a left justified text, although code sections are problematic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roni Vered</title>
		<link>http://hoopercharles.wordpress.com/2010/04/21/true-or-false-direct-path-reads/#comment-3288</link>
		<dc:creator><![CDATA[Roni Vered]]></dc:creator>
		<pubDate>Wed, 01 Jun 2011 12:43:21 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=1937#comment-3288</guid>
		<description><![CDATA[Thanks, I&#039;ve subscribed.
Keep posting interesting challenges :) 
We publish every month a database challenge in our website (ilDBA.co.il), and the May challenge was about the aforementioned behavior (what happens with FTS).
The site is in Hebrew, so it probably won&#039;t be helpful to you, but your post helped me with answering this month&#039;s challenge.

Cheers,
Roni.]]></description>
		<content:encoded><![CDATA[<p>Thanks, I&#8217;ve subscribed.<br />
Keep posting interesting challenges <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
We publish every month a database challenge in our website (ilDBA.co.il), and the May challenge was about the aforementioned behavior (what happens with FTS).<br />
The site is in Hebrew, so it probably won&#8217;t be helpful to you, but your post helped me with answering this month&#8217;s challenge.</p>
<p>Cheers,<br />
Roni.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/04/21/true-or-false-direct-path-reads/#comment-3286</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Wed, 01 Jun 2011 11:54:51 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=1937#comment-3286</guid>
		<description><![CDATA[Hi Roni,

Thank you for the comment.

My blog only sends out shortened blog articles in the RSS feed.  I searched Wordpress and found the following article that shows how to subscribe to an RSS feed for a Wordpress blog:
http://en.support.wordpress.com/feeds/

Based on the above article, it appears that there are several variations of RSS feeds for Wordpress blogs.  The main RSS feed for this blog appears to be:
http://hoopercharles.wordpress.com/feed/

You might also take a look at the OakTable Network site, where my blog articles are listed, along with the blog articles of other (much more knowledgeable) OakTable Network members:
http://www.oaktable.net/

And the RSS feed for the OakTable Network site:
http://www.oaktable.net/feed/blog-rss.xml]]></description>
		<content:encoded><![CDATA[<p>Hi Roni,</p>
<p>Thank you for the comment.</p>
<p>My blog only sends out shortened blog articles in the RSS feed.  I searched WordPress and found the following article that shows how to subscribe to an RSS feed for a WordPress blog:<br />
<a href="http://en.support.wordpress.com/feeds/" rel="nofollow">http://en.support.wordpress.com/feeds/</a></p>
<p>Based on the above article, it appears that there are several variations of RSS feeds for WordPress blogs.  The main RSS feed for this blog appears to be:<br />
<a href="http://hoopercharles.wordpress.com/feed/" rel="nofollow">http://hoopercharles.wordpress.com/feed/</a></p>
<p>You might also take a look at the OakTable Network site, where my blog articles are listed, along with the blog articles of other (much more knowledgeable) OakTable Network members:<br />
<a href="http://www.oaktable.net/" rel="nofollow">http://www.oaktable.net/</a></p>
<p>And the RSS feed for the OakTable Network site:<br />
<a href="http://www.oaktable.net/feed/blog-rss.xml" rel="nofollow">http://www.oaktable.net/feed/blog-rss.xml</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roni Vered</title>
		<link>http://hoopercharles.wordpress.com/2010/04/21/true-or-false-direct-path-reads/#comment-3285</link>
		<dc:creator><![CDATA[Roni Vered]]></dc:creator>
		<pubDate>Wed, 01 Jun 2011 11:19:12 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=1937#comment-3285</guid>
		<description><![CDATA[Fascinating !
Thank you so much for you post.
I spent some time on this post, as it was so interesting.
I stamped on the Direct read path issue today and you and your comments gave me a lot to think of.

Cheers :)
Roni.

PS - I didn&#039;t find anywhere a link for general RSS for your blog, only for the specific posts&#039; comments.
Can you please send me the rss feed? 
I don&#039;t like notifications by mails.]]></description>
		<content:encoded><![CDATA[<p>Fascinating !<br />
Thank you so much for you post.<br />
I spent some time on this post, as it was so interesting.<br />
I stamped on the Direct read path issue today and you and your comments gave me a lot to think of.</p>
<p>Cheers <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Roni.</p>
<p>PS &#8211; I didn&#8217;t find anywhere a link for general RSS for your blog, only for the specific posts&#8217; comments.<br />
Can you please send me the rss feed?<br />
I don&#8217;t like notifications by mails.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/04/21/true-or-false-direct-path-reads/#comment-700</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Fri, 23 Apr 2010 15:38:44 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=1937#comment-700</guid>
		<description><![CDATA[Donatello,

Thank you for adding value to this blog article with your answers.  Just as was the case with Fidelinho&#039;s answers, your answers were a little different from what I had in mind when I wrote the questions - but that is an improvement, I think.  Your answers included information that I had hoped that someone would include in their responses.  Article #1 attempted to answer questions #1 through #4 - I think :-) , while questions 5 and 6 require much more investigation to answer.

The answers that I put together continue:
#4  The * at the end of the question links to the documentation for Oracle Database 11.2.0.1 that describes the PARALLEL_DEGREE_POLICY parameter: &quot;When the parameter PARALLEL_DEGREE_POLICY is set to AUTO, Oracle Database decides if an object that is accessed using parallel execution would benefit from being cached in the SGA (buffer cache)... If the size of the object is larger than the size of the buffer cache (single instance) or the size of the buffer cache multiplied by the number of active instances in an Oracle RAC cluster, then it is read using direct path reads.&quot;  So, as of 11.2.0.1 parallel query is able to automatically take advantage of the buffer cache - therefore this question is false.

Donatello mentioned that a checkpoint (object check point?) is performed to write the dirty blocks to disk before the parallel operation is able to start, and therefore parallel query does not completely avoid the buffer cache.  This is not something that I planned to include in my answer, but I am happy that someone mentioned this behavior.

---

#5  I initially planned to cheat on the answer to this question.  _SERIAL_DIRECT_READ is a hidden parameter, and should NOT be modified without the consent of Oracle support.  So, the answer is FALSE, this parameter should not be modified.  (The excellent answers provided by the other responders demonstrate why I should not be answering all of the questions :-) ).

#6  To an extent the _SMALL_TABLE_THRESHOLD parameter value controls whether or not recent releases of Oracle Database perform direct path reads when the _SERIAL_DIRECT_READ parameter is set to TRUE.  The linked blog article that was written by Dion Cho indicates that the tipping point is reached when the number of block exceeds 5 times the value of _SMALL_TABLE_THRESHOLD.  I would probably need to perform first-hand tests to confirm that this is always the tipping point in 11.1.0.6, 11.1.0.7, and 11.2.0.1.  So, this is the one and only question that I could answer with TRUE, although Donatello makes a good point that the answer could also be false.]]></description>
		<content:encoded><![CDATA[<p>Donatello,</p>
<p>Thank you for adding value to this blog article with your answers.  Just as was the case with Fidelinho&#8217;s answers, your answers were a little different from what I had in mind when I wrote the questions &#8211; but that is an improvement, I think.  Your answers included information that I had hoped that someone would include in their responses.  Article #1 attempted to answer questions #1 through #4 &#8211; I think <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  , while questions 5 and 6 require much more investigation to answer.</p>
<p>The answers that I put together continue:<br />
#4  The * at the end of the question links to the documentation for Oracle Database 11.2.0.1 that describes the PARALLEL_DEGREE_POLICY parameter: &#8220;When the parameter PARALLEL_DEGREE_POLICY is set to AUTO, Oracle Database decides if an object that is accessed using parallel execution would benefit from being cached in the SGA (buffer cache)&#8230; If the size of the object is larger than the size of the buffer cache (single instance) or the size of the buffer cache multiplied by the number of active instances in an Oracle RAC cluster, then it is read using direct path reads.&#8221;  So, as of 11.2.0.1 parallel query is able to automatically take advantage of the buffer cache &#8211; therefore this question is false.</p>
<p>Donatello mentioned that a checkpoint (object check point?) is performed to write the dirty blocks to disk before the parallel operation is able to start, and therefore parallel query does not completely avoid the buffer cache.  This is not something that I planned to include in my answer, but I am happy that someone mentioned this behavior.</p>
<p>&#8212;</p>
<p>#5  I initially planned to cheat on the answer to this question.  _SERIAL_DIRECT_READ is a hidden parameter, and should NOT be modified without the consent of Oracle support.  So, the answer is FALSE, this parameter should not be modified.  (The excellent answers provided by the other responders demonstrate why I should not be answering all of the questions <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ).</p>
<p>#6  To an extent the _SMALL_TABLE_THRESHOLD parameter value controls whether or not recent releases of Oracle Database perform direct path reads when the _SERIAL_DIRECT_READ parameter is set to TRUE.  The linked blog article that was written by Dion Cho indicates that the tipping point is reached when the number of block exceeds 5 times the value of _SMALL_TABLE_THRESHOLD.  I would probably need to perform first-hand tests to confirm that this is always the tipping point in 11.1.0.6, 11.1.0.7, and 11.2.0.1.  So, this is the one and only question that I could answer with TRUE, although Donatello makes a good point that the answer could also be false.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Donatello Settembrino</title>
		<link>http://hoopercharles.wordpress.com/2010/04/21/true-or-false-direct-path-reads/#comment-699</link>
		<dc:creator><![CDATA[Donatello Settembrino]]></dc:creator>
		<pubDate>Fri, 23 Apr 2010 13:33:29 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=1937#comment-699</guid>
		<description><![CDATA[Hi Charles, 
I state that I don&#039;t read the link that you have suggested :(  but I know the discussion Christian Antognini&#039;s blog because I was involved too


1.  Direct path read waits will only appear when parallel query is used, 
    for example, a full table scan executed in parallel. 

False, direct reads can be performed with a serial table scan



2.  Parallel query is enabled at the session and instance level 
    by setting a table’s parallel degree to 32.

False. I  had too the same question, why 32? just use
hint / * + PARALLEL (table-name integer) * /

3.  Setting a parallel degree for a table or index forces the cost-based optimizer  to calculate the cost of a full scan of the table (or index) with a lower value  than the cost of the corresponding index’s range scan access path.

False. Even for me is false, I&#039;m fully agree with your assertion
&quot;False, setting the degree of parallel will decrease the calculated cost of the full table scan, but will not necessarily decrease the calculated cost so that it is lower than the calculated cost for an index range access path. &quot;
&lt;pre&gt;
SQL&gt; create table t1 as select rownum as id , &#039;x&#039; as c from dual connect by level  commit;

SQL&gt; create index ix on t1(id);

SQL&gt; exec DBMS_STATS.GATHER_TABLE_STATS (ownname =&gt; user, tabname =&gt; &#039;T1&#039;);

SQL&gt; set autotrace traceonly;
 
SQL&gt; select /*+ index(t1 ix) */ count(*) from t1 where id between 5000 and 70000;
&lt;/pre&gt;
 
&lt;pre&gt;
---------------------------------------------------------------
&#124; Id  &#124; Operation         &#124; Name &#124; Rows  &#124; Bytes &#124; Cost (%CPU)&#124;
---------------------------------------------------------------
&#124;   0 &#124; SELECT STATEMENT  &#124;      &#124;     1 &#124;    13 &#124;    82   (2)&#124;
&#124;   1 &#124;  SORT AGGREGATE   &#124;      &#124;     1 &#124;    13 &#124;            &#124;
&#124;   2 &#124;   INDEX RANGE SCAN&#124; IX   &#124; 82653 &#124;  1049K&#124;    82   (2)&#124;
---------------------------------------------------------------
&lt;/pre&gt;
 
&lt;pre&gt;
SQL&gt; select /*+ parallel(t1 4) */ count(*) from t1 where id between 5000  and 70000;
&lt;/pre&gt;
 
&lt;pre&gt;
---------------------------------------------------------------
&#124; Id  &#124; Operation         &#124; Name &#124; Rows  &#124; Bytes &#124; Cost (%CPU)&#124;
---------------------------------------------------------------
&#124;   0 &#124; SELECT STATEMENT  &#124;      &#124;     1 &#124;    13 &#124;    82   (2)&#124;
&#124;   1 &#124;  SORT AGGREGATE   &#124;      &#124;     1 &#124;    13 &#124;            &#124;
&#124;   2 &#124;   INDEX RANGE SCAN&#124; IX   &#124; 82653 &#124;  1049K&#124;    82   (2)&#124;
---------------------------------------------------------------
&lt;/pre&gt;
forcing parallels the CBO doesn&#039;t consider to use it. The cost by using index is less. In fact, if I make the index unusable ...

&lt;pre&gt;
SQL&gt; alter index ix unusable;

SQL&gt; select /*+ parallel(t1 4) */ count(*) from t1 where id between 5000  and 70000;
&lt;/pre&gt;
 
&lt;pre&gt;
----------------------------------------------------------------------------------------------------
&#124; Id  &#124; Operation              &#124; Name     &#124; Rows  &#124; Bytes &#124; Cost (%CPU)&#124;    TQ  &#124;IN-OUT&#124; PQ Distrib &#124;
----------------------------------------------------------------------------------------------------
&#124;   0 &#124; SELECT STATEMENT       &#124;          &#124;     1 &#124;    13 &#124;    84   (8)&#124;        &#124;      &#124;            &#124;
&#124;   1 &#124;  SORT AGGREGATE        &#124;          &#124;     1 &#124;    13 &#124;            &#124;        &#124;      &#124;            &#124;
&#124;   2 &#124;   PX COORDINATOR       &#124;          &#124;       &#124;       &#124;            &#124;        &#124;      &#124;            &#124;
&#124;   3 &#124;    PX SEND QC (RANDOM) &#124; :TQ10000 &#124;     1 &#124;    13 &#124;            &#124;  Q1,00 &#124; P-&gt;S &#124; QC (RAND)  &#124;
&#124;   4 &#124;     SORT AGGREGATE     &#124;          &#124;     1 &#124;    13 &#124;            &#124;  Q1,00 &#124; PCWP &#124;            &#124;
&#124;   5 &#124;      PX BLOCK ITERATOR &#124;          &#124; 82653 &#124;  1049K&#124;    84   (8)&#124;  Q1,00 &#124; PCWC &#124;            &#124;
&#124;   6 &#124;       TABLE ACCESS FULL&#124; T1       &#124; 82653 &#124;  1049K&#124;    84   (8)&#124;  Q1,00 &#124; PCWP &#124;            &#124;
----------------------------------------------------------------------------------------------------
&lt;/pre&gt;

...the cost achieved by the parallel is greater than that obtained using the index


4.  Physical block reads performed during parallel query operations are always brought directly into the program global area (PGA), completely avoiding the buffer cache. 
 
False. &quot;completely avoiding the buffer cache&quot;..hmmm, teorically, the blocks are taken and brought to the PGA, but if some of these blocks are dirty and are therefore in the buffer cache, Oracle will perform a checkpoint (so will be downloaded to disk) and retrieve the blocks from disk
   

5.  The hidden parameter _SERIAL_DIRECT_READ should be set to FALSE to prevent problems caused by excessive direct path reads.

False (in some cases). In 10g _SERIAL_DIRECT_READ setting to FALSE causes Oracle to not perform direct reads (even if the number of blocks requested exceeds the threshold defined on the hidden parameter _small_table_threshold).
In 11g, with _serial_direct_read = FALSE and if the number of blocks exceeds 5 times the value of _small_table_threshold  the direct reads are applied
You can see the test case that I have done the following link

http://antognini.ch/2009/07/impact-of-direct-reads-on-delayed-block-cleanouts/#comment-6068



6.  The hidden parameter _SMALL_TABLE_THRESHOLD affects Oracle’s decision to perform direct path reads.

True or False :) depends by versions .My interpretation is always at the following link



http://antognini.ch/2009/07/impact-of-direct-reads-on-delayed-block-cleanouts/#comment-6068

Regards]]></description>
		<content:encoded><![CDATA[<p>Hi Charles,<br />
I state that I don&#8217;t read the link that you have suggested <img src='http://s0.wp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />   but I know the discussion Christian Antognini&#8217;s blog because I was involved too</p>
<p>1.  Direct path read waits will only appear when parallel query is used,<br />
    for example, a full table scan executed in parallel. </p>
<p>False, direct reads can be performed with a serial table scan</p>
<p>2.  Parallel query is enabled at the session and instance level<br />
    by setting a table’s parallel degree to 32.</p>
<p>False. I  had too the same question, why 32? just use<br />
hint / * + PARALLEL (table-name integer) * /</p>
<p>3.  Setting a parallel degree for a table or index forces the cost-based optimizer  to calculate the cost of a full scan of the table (or index) with a lower value  than the cost of the corresponding index’s range scan access path.</p>
<p>False. Even for me is false, I&#8217;m fully agree with your assertion<br />
&#8220;False, setting the degree of parallel will decrease the calculated cost of the full table scan, but will not necessarily decrease the calculated cost so that it is lower than the calculated cost for an index range access path. &#8221;</p>
<pre>
SQL&gt; create table t1 as select rownum as id , 'x' as c from dual connect by level  commit;

SQL&gt; create index ix on t1(id);

SQL&gt; exec DBMS_STATS.GATHER_TABLE_STATS (ownname =&gt; user, tabname =&gt; 'T1');

SQL&gt; set autotrace traceonly;
 
SQL&gt; select /*+ index(t1 ix) */ count(*) from t1 where id between 5000 and 70000;
</pre>
<pre>
---------------------------------------------------------------
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)|
---------------------------------------------------------------
|   0 | SELECT STATEMENT  |      |     1 |    13 |    82   (2)|
|   1 |  SORT AGGREGATE   |      |     1 |    13 |            |
|   2 |   INDEX RANGE SCAN| IX   | 82653 |  1049K|    82   (2)|
---------------------------------------------------------------
</pre>
<pre>
SQL&gt; select /*+ parallel(t1 4) */ count(*) from t1 where id between 5000  and 70000;
</pre>
<pre>
---------------------------------------------------------------
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)|
---------------------------------------------------------------
|   0 | SELECT STATEMENT  |      |     1 |    13 |    82   (2)|
|   1 |  SORT AGGREGATE   |      |     1 |    13 |            |
|   2 |   INDEX RANGE SCAN| IX   | 82653 |  1049K|    82   (2)|
---------------------------------------------------------------
</pre>
<p>forcing parallels the CBO doesn&#8217;t consider to use it. The cost by using index is less. In fact, if I make the index unusable &#8230;</p>
<pre>
SQL&gt; alter index ix unusable;

SQL&gt; select /*+ parallel(t1 4) */ count(*) from t1 where id between 5000  and 70000;
</pre>
<pre>
----------------------------------------------------------------------------------------------------
| Id  | Operation              | Name     | Rows  | Bytes | Cost (%CPU)|    TQ  |IN-OUT| PQ Distrib |
----------------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT       |          |     1 |    13 |    84   (8)|        |      |            |
|   1 |  SORT AGGREGATE        |          |     1 |    13 |            |        |      |            |
|   2 |   PX COORDINATOR       |          |       |       |            |        |      |            |
|   3 |    PX SEND QC (RANDOM) | :TQ10000 |     1 |    13 |            |  Q1,00 | P-&gt;S | QC (RAND)  |
|   4 |     SORT AGGREGATE     |          |     1 |    13 |            |  Q1,00 | PCWP |            |
|   5 |      PX BLOCK ITERATOR |          | 82653 |  1049K|    84   (8)|  Q1,00 | PCWC |            |
|   6 |       TABLE ACCESS FULL| T1       | 82653 |  1049K|    84   (8)|  Q1,00 | PCWP |            |
----------------------------------------------------------------------------------------------------
</pre>
<p>&#8230;the cost achieved by the parallel is greater than that obtained using the index</p>
<p>4.  Physical block reads performed during parallel query operations are always brought directly into the program global area (PGA), completely avoiding the buffer cache. </p>
<p>False. &#8220;completely avoiding the buffer cache&#8221;..hmmm, teorically, the blocks are taken and brought to the PGA, but if some of these blocks are dirty and are therefore in the buffer cache, Oracle will perform a checkpoint (so will be downloaded to disk) and retrieve the blocks from disk</p>
<p>5.  The hidden parameter _SERIAL_DIRECT_READ should be set to FALSE to prevent problems caused by excessive direct path reads.</p>
<p>False (in some cases). In 10g _SERIAL_DIRECT_READ setting to FALSE causes Oracle to not perform direct reads (even if the number of blocks requested exceeds the threshold defined on the hidden parameter _small_table_threshold).<br />
In 11g, with _serial_direct_read = FALSE and if the number of blocks exceeds 5 times the value of _small_table_threshold  the direct reads are applied<br />
You can see the test case that I have done the following link</p>
<p><a href="http://antognini.ch/2009/07/impact-of-direct-reads-on-delayed-block-cleanouts/#comment-6068" rel="nofollow">http://antognini.ch/2009/07/impact-of-direct-reads-on-delayed-block-cleanouts/#comment-6068</a></p>
<p>6.  The hidden parameter _SMALL_TABLE_THRESHOLD affects Oracle’s decision to perform direct path reads.</p>
<p>True or False <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  depends by versions .My interpretation is always at the following link</p>
<p><a href="http://antognini.ch/2009/07/impact-of-direct-reads-on-delayed-block-cleanouts/#comment-6068" rel="nofollow">http://antognini.ch/2009/07/impact-of-direct-reads-on-delayed-block-cleanouts/#comment-6068</a></p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/04/21/true-or-false-direct-path-reads/#comment-694</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Thu, 22 Apr 2010 15:38:47 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=1937#comment-694</guid>
		<description><![CDATA[#2 False - the first thing that I thought about when I saw the suggestion to set the table&#039;s parallel degree to 32 was the same as what was mentioned by Fidelinho - why 32?  What was the logical process to arrive at the number 32, why is that number better or worse than the number 2, 10, or 1000 (http://hoopercharles.wordpress.com/2010/02/17/parallel-reasoning/).  Simply setting a table&#039;s parallel degree to a value greater than 1 does not force the use of parallel query at the session or instance level.  What if the table is never queried by a session, is parallel query still enabled for the session?  What if, as described in my Parallel Reasoning article, an index access path still offers a lower calculated cost than would the parallel access path?

I like Fidelinho&#039;s suggestion that a hint is also able to cause a parallel execution - something that I did not consider while writing the question.

#3 False, setting the degree of parallel will decrease the calculated cost of the full table scan, but will not necessarily decrease the calculated cost so that it is lower than the calculated cost for an index range access path.]]></description>
		<content:encoded><![CDATA[<p>#2 False &#8211; the first thing that I thought about when I saw the suggestion to set the table&#8217;s parallel degree to 32 was the same as what was mentioned by Fidelinho &#8211; why 32?  What was the logical process to arrive at the number 32, why is that number better or worse than the number 2, 10, or 1000 (<a href="http://hoopercharles.wordpress.com/2010/02/17/parallel-reasoning/" rel="nofollow">http://hoopercharles.wordpress.com/2010/02/17/parallel-reasoning/</a>).  Simply setting a table&#8217;s parallel degree to a value greater than 1 does not force the use of parallel query at the session or instance level.  What if the table is never queried by a session, is parallel query still enabled for the session?  What if, as described in my Parallel Reasoning article, an index access path still offers a lower calculated cost than would the parallel access path?</p>
<p>I like Fidelinho&#8217;s suggestion that a hint is also able to cause a parallel execution &#8211; something that I did not consider while writing the question.</p>
<p>#3 False, setting the degree of parallel will decrease the calculated cost of the full table scan, but will not necessarily decrease the calculated cost so that it is lower than the calculated cost for an index range access path.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/04/21/true-or-false-direct-path-reads/#comment-691</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Wed, 21 Apr 2010 22:45:45 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=1937#comment-691</guid>
		<description><![CDATA[I want to first say that my answers are *not* the only correct answers - I might even be wrong from time to time.  I must compliment Wordpress for the possibly related blog article topics of &quot;anti-garlic&quot;, &quot;Hee!&quot;, and &quot;Too Many Crooks Spoil the Broth&quot; - something might be leaving a bad taste in my mouth (this is a figure of speech for the non-native English readers).

For question #1 the keyword &quot;waits&quot; is critical in the phrasing of the question (for non-native English readers, this distinction may have been lost in translation).  If the word &quot;waits&quot; did not appear, then this question becomes one of when are direct path reads used.  Most of the possibilities are listed in the linked article #6, a book with a copyright date of 2004 if I recall correctly, and I believe that Fidelinho covered this possibility also.  Oracle 11g R1, introduced in August 2007 based on the dates I listed in this blog article, enabled the capability for non-parallel (serial) operations to perform direct path reads, and these direct path reads appear as direct path waits in 10046 trace files.  Articles #3, #4 and #5 above describe this behavior, and article #2 shows that the feature may be enabled in Oracle 10g by modifying a hidden initialization parameter.

Once again, the keyword &quot;waits&quot; is key for answering this question as it was originally intended.  Prior to Oracle Database 10g R1 direct path reads that accessed the TEMP tablespace were lumped into the same &#039;direct path read&#039; wait event that appears when parallel query operations were used.  With &lt;a href=&quot;http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/instance_tune.htm#sthref729&quot; rel=&quot;nofollow&quot;&gt;Oracle Database 10g R1&lt;/a&gt; reads of the TEMP tablespace appear as &#039;direct path read temp&#039; waits in a 10046 trace file.  With &lt;a href=&quot;http://download.oracle.com/docs/cd/E11882_01/server.112/e10837/parallel002.htm#CIHEFJGC&quot; rel=&quot;nofollow&quot;&gt;Oracle Database 11g R1&lt;/a&gt; direct path read waits may appear automatically during a full table scan without the use of parallel query.

Correctly answering question #1 therefore requires either the specification of a specific Oracle Database release (11.1.0.6, 10.2.0.4, 9.2.0.8, etc.) or a specific &quot;as of&quot; date.  Article #1 has a date that falls between the release of Oracle Database 11.1.0.7 and 11.2.0.1.  Question #1 is a restatement of an assertion that appears in article #1.  The short answer for question #1 is False.

I encourage readers to provide their answers to the above questions.  Even if the answers are not 100% what I had in mind, the answers might provide additional detail that allows the message of the blog article to expand into additional, new directions as happened with Fidelinho&#039;s justification for question #1.  The hope is that blog articles like this one cause people to stop, think, and understand (even if my answers are not completely correct due to translation problems or a mistake that I might have made).]]></description>
		<content:encoded><![CDATA[<p>I want to first say that my answers are *not* the only correct answers &#8211; I might even be wrong from time to time.  I must compliment WordPress for the possibly related blog article topics of &#8220;anti-garlic&#8221;, &#8220;Hee!&#8221;, and &#8220;Too Many Crooks Spoil the Broth&#8221; &#8211; something might be leaving a bad taste in my mouth (this is a figure of speech for the non-native English readers).</p>
<p>For question #1 the keyword &#8220;waits&#8221; is critical in the phrasing of the question (for non-native English readers, this distinction may have been lost in translation).  If the word &#8220;waits&#8221; did not appear, then this question becomes one of when are direct path reads used.  Most of the possibilities are listed in the linked article #6, a book with a copyright date of 2004 if I recall correctly, and I believe that Fidelinho covered this possibility also.  Oracle 11g R1, introduced in August 2007 based on the dates I listed in this blog article, enabled the capability for non-parallel (serial) operations to perform direct path reads, and these direct path reads appear as direct path waits in 10046 trace files.  Articles #3, #4 and #5 above describe this behavior, and article #2 shows that the feature may be enabled in Oracle 10g by modifying a hidden initialization parameter.</p>
<p>Once again, the keyword &#8220;waits&#8221; is key for answering this question as it was originally intended.  Prior to Oracle Database 10g R1 direct path reads that accessed the TEMP tablespace were lumped into the same &#8216;direct path read&#8217; wait event that appears when parallel query operations were used.  With <a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/instance_tune.htm#sthref729" rel="nofollow">Oracle Database 10g R1</a> reads of the TEMP tablespace appear as &#8216;direct path read temp&#8217; waits in a 10046 trace file.  With <a href="http://download.oracle.com/docs/cd/E11882_01/server.112/e10837/parallel002.htm#CIHEFJGC" rel="nofollow">Oracle Database 11g R1</a> direct path read waits may appear automatically during a full table scan without the use of parallel query.</p>
<p>Correctly answering question #1 therefore requires either the specification of a specific Oracle Database release (11.1.0.6, 10.2.0.4, 9.2.0.8, etc.) or a specific &#8220;as of&#8221; date.  Article #1 has a date that falls between the release of Oracle Database 11.1.0.7 and 11.2.0.1.  Question #1 is a restatement of an assertion that appears in article #1.  The short answer for question #1 is False.</p>
<p>I encourage readers to provide their answers to the above questions.  Even if the answers are not 100% what I had in mind, the answers might provide additional detail that allows the message of the blog article to expand into additional, new directions as happened with Fidelinho&#8217;s justification for question #1.  The hope is that blog articles like this one cause people to stop, think, and understand (even if my answers are not completely correct due to translation problems or a mistake that I might have made).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fidelinho</title>
		<link>http://hoopercharles.wordpress.com/2010/04/21/true-or-false-direct-path-reads/#comment-688</link>
		<dc:creator><![CDATA[Fidelinho]]></dc:creator>
		<pubDate>Wed, 21 Apr 2010 17:59:56 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=1937#comment-688</guid>
		<description><![CDATA[Hi,
Thanks for the answers. I do not pretend to say that my answers are &quot;better&quot; or &quot;worse&quot; than yours. It is what came to my mind at that point in time. Nice because It made me think a little]]></description>
		<content:encoded><![CDATA[<p>Hi,<br />
Thanks for the answers. I do not pretend to say that my answers are &#8220;better&#8221; or &#8220;worse&#8221; than yours. It is what came to my mind at that point in time. Nice because It made me think a little</p>
]]></content:encoded>
	</item>
</channel>
</rss>
