<?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 Could Go Wrong? Testing the DB_FILE_MULTIBLOCK_READ_COUNT Parameter</title>
	<atom:link href="http://hoopercharles.wordpress.com/2011/10/14/what-could-go-wrong-testing-the-db_file_multiblock_read_count-parameter/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoopercharles.wordpress.com/2011/10/14/what-could-go-wrong-testing-the-db_file_multiblock_read_count-parameter/</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: Donatello Settembrino</title>
		<link>http://hoopercharles.wordpress.com/2011/10/14/what-could-go-wrong-testing-the-db_file_multiblock_read_count-parameter/#comment-4047</link>
		<dc:creator><![CDATA[Donatello Settembrino]]></dc:creator>
		<pubDate>Tue, 25 Oct 2011 07:25:06 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5542#comment-4047</guid>
		<description><![CDATA[Hi Charles,

&gt;&gt; It might, however, make a difference if the blocks belonging to the table are read by direct path read (commonly 
&gt;&gt; used in Oracle Database 11.1 and above) or are read into the buffer cache by a db file scattered read – it also 
&gt;&gt; makes a difference if the table’s blocks are already in the buffer cache.


which is what I meant when I wrote ...

&gt;&gt; ... a &quot;change in timing&quot; of Engine when it is called to recall the blocks ...


Regards,
Donatello]]></description>
		<content:encoded><![CDATA[<p>Hi Charles,</p>
<p>&gt;&gt; It might, however, make a difference if the blocks belonging to the table are read by direct path read (commonly<br />
&gt;&gt; used in Oracle Database 11.1 and above) or are read into the buffer cache by a db file scattered read – it also<br />
&gt;&gt; makes a difference if the table’s blocks are already in the buffer cache.</p>
<p>which is what I meant when I wrote &#8230;</p>
<p>&gt;&gt; &#8230; a &#8220;change in timing&#8221; of Engine when it is called to recall the blocks &#8230;</p>
<p>Regards,<br />
Donatello</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/10/14/what-could-go-wrong-testing-the-db_file_multiblock_read_count-parameter/#comment-4045</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Mon, 24 Oct 2011 18:17:44 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5542#comment-4045</guid>
		<description><![CDATA[Hi Donatello,

It is interesting to see the application of logic to determine what did or did not happen - listing the clues that lead someone to believe that something happened, and then counter-clues that indicate that something else likely happened.  

Good point about not seeing a &quot;ALTER SESSION SET result_cache_mode = FORCE;&quot; in the test case - I try to make certain that my test cases are reproducible, but there is always a small chance that a modified setting will be left over from a previous test case.  As mentioned in the additional information that I added to the blog post, the total execution time required ranged between 00:00:37.05 and 00:00:39.37 for testing 128 values of the DB_FILE_MULTIBLOCK_READ_COUNT parameter.  I was careful to hide that timing information when the blog post was originally created, in part so that I could see the rules of logic that people would use to determine what happened.

You are correct that in my test case it does not matter whether or not workload statistics or noworkload statistics used - in the test case it really does not matter what the calculated cost is based on the change to the workload statistics.  It might, however, make a difference if the blocks belonging to the table are read by direct path read (commonly used in Oracle Database 11.1 and above) or are read into the buffer cache by a db file scattered read - it also makes a difference if the table&#039;s blocks are already in the buffer cache.  

The idea of the test, as mentioned by Chris, is to consider the real performance impact caused by articifically limiting the size of a multi-block read request below the typical 1MB limit.  Consider if the database block size is 8KB, and collecting workload statistics results in a MBRC value (the average multi-block read size) of 64.  The system can only obtain a MBRC value of 64 if the DB_FILE_MULTIBLOCK_READ_COUNT parameter is at least 64.  Now, assume that testing shows that the system performance improves when the DB_FILE_MULTIBLOCK_READ_COUNT parameter is adjusted from the default (unset) value of 128 to a value of 32.  If you change that parameter value to 32, you need to make certain that you either collect updated system statistics, or manually set the MBRC value to a lower value.  So, one thing that could go wrong is that you set the DB_FILE_MULTIBLOCK_READ_COUNT parameter to a value smaller than the MBRC system statistic, which means that the MBRC statistic is then unrealistic.  But, if you change the MBRC statistic, you risk changing the execution plans of most of the SQL statements that are executed in the database.  If you are not using workload statistics, changing the value of the DB_FILE_MULTIBLOCK_READ_COUNT parameter could also change the execution plans.]]></description>
		<content:encoded><![CDATA[<p>Hi Donatello,</p>
<p>It is interesting to see the application of logic to determine what did or did not happen &#8211; listing the clues that lead someone to believe that something happened, and then counter-clues that indicate that something else likely happened.  </p>
<p>Good point about not seeing a &#8220;ALTER SESSION SET result_cache_mode = FORCE;&#8221; in the test case &#8211; I try to make certain that my test cases are reproducible, but there is always a small chance that a modified setting will be left over from a previous test case.  As mentioned in the additional information that I added to the blog post, the total execution time required ranged between 00:00:37.05 and 00:00:39.37 for testing 128 values of the DB_FILE_MULTIBLOCK_READ_COUNT parameter.  I was careful to hide that timing information when the blog post was originally created, in part so that I could see the rules of logic that people would use to determine what happened.</p>
<p>You are correct that in my test case it does not matter whether or not workload statistics or noworkload statistics used &#8211; in the test case it really does not matter what the calculated cost is based on the change to the workload statistics.  It might, however, make a difference if the blocks belonging to the table are read by direct path read (commonly used in Oracle Database 11.1 and above) or are read into the buffer cache by a db file scattered read &#8211; it also makes a difference if the table&#8217;s blocks are already in the buffer cache.  </p>
<p>The idea of the test, as mentioned by Chris, is to consider the real performance impact caused by articifically limiting the size of a multi-block read request below the typical 1MB limit.  Consider if the database block size is 8KB, and collecting workload statistics results in a MBRC value (the average multi-block read size) of 64.  The system can only obtain a MBRC value of 64 if the DB_FILE_MULTIBLOCK_READ_COUNT parameter is at least 64.  Now, assume that testing shows that the system performance improves when the DB_FILE_MULTIBLOCK_READ_COUNT parameter is adjusted from the default (unset) value of 128 to a value of 32.  If you change that parameter value to 32, you need to make certain that you either collect updated system statistics, or manually set the MBRC value to a lower value.  So, one thing that could go wrong is that you set the DB_FILE_MULTIBLOCK_READ_COUNT parameter to a value smaller than the MBRC system statistic, which means that the MBRC statistic is then unrealistic.  But, if you change the MBRC statistic, you risk changing the execution plans of most of the SQL statements that are executed in the database.  If you are not using workload statistics, changing the value of the DB_FILE_MULTIBLOCK_READ_COUNT parameter could also change the execution plans.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Donatello Settembrino</title>
		<link>http://hoopercharles.wordpress.com/2011/10/14/what-could-go-wrong-testing-the-db_file_multiblock_read_count-parameter/#comment-4038</link>
		<dc:creator><![CDATA[Donatello Settembrino]]></dc:creator>
		<pubDate>Fri, 21 Oct 2011 15:00:53 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5542#comment-4038</guid>
		<description><![CDATA[Hi Charles,
reading your test the first thing that came to mind is the use of the result cache, 
because it uses a DB 11g version, but I immediately thought that this could not be, for two reasons:

1) did not specify
  ALTER SESSION SET result_cache_mode = FORCE;
Or, you do not use the hint / *+  RESULT_CACHE */

the default for this parameter is &#039;MANUAL&#039;

2) the first run lasted 0 seconds, using the result cache
takes 0 seconds, at least from the second run onwards ....

Another thing caught my attention reading the comments ....
did not specify if your test is done with system workload statistics
noworkload or system statistics, because I think it does not matter in your tests.
In fact we are not comparing the cost of two queries, we&#039;re just trying
to compare the execution times to vary db_file_multiblock_read_count, right?

 
but then, because it comes to recalculate the statistics system?
we are not discussing a change in cost, then the CBO, but
we&#039;re talking about a change in timing of Engine when it is called
to recall the blocks ...]]></description>
		<content:encoded><![CDATA[<p>Hi Charles,<br />
reading your test the first thing that came to mind is the use of the result cache,<br />
because it uses a DB 11g version, but I immediately thought that this could not be, for two reasons:</p>
<p>1) did not specify<br />
  ALTER SESSION SET result_cache_mode = FORCE;<br />
Or, you do not use the hint / *+  RESULT_CACHE */</p>
<p>the default for this parameter is &#8216;MANUAL&#8217;</p>
<p>2) the first run lasted 0 seconds, using the result cache<br />
takes 0 seconds, at least from the second run onwards &#8230;.</p>
<p>Another thing caught my attention reading the comments &#8230;.<br />
did not specify if your test is done with system workload statistics<br />
noworkload or system statistics, because I think it does not matter in your tests.<br />
In fact we are not comparing the cost of two queries, we&#8217;re just trying<br />
to compare the execution times to vary db_file_multiblock_read_count, right?</p>
<p>but then, because it comes to recalculate the statistics system?<br />
we are not discussing a change in cost, then the CBO, but<br />
we&#8217;re talking about a change in timing of Engine when it is called<br />
to recall the blocks &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/10/14/what-could-go-wrong-testing-the-db_file_multiblock_read_count-parameter/#comment-4028</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Mon, 17 Oct 2011 17:48:11 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5542#comment-4028</guid>
		<description><![CDATA[Good point!  By the way, nice formula (on the page containing this test case) that shows how the value of the DB_FILE_MULTIBLOCK_READ_COUNT parameter is automatically derived.

I probably should have written that paragraph a little differently.  The comment was definitely not intended to be critical of what you wrote in this section of the book.  In the paragraph I attempted to describe how, when I was reading the test case, I should have glanced further down the page of the book to notice that you also described the possibility of leaving the DB_FILE_MULTIBLOCK_READ_COUNT parameter unset.  I also should have remembered that the book, while targeting Oracle Database 11.1, also provides very detailed information about how the behavior of the earlier Oracle Database versions differed (other books fail to do this).]]></description>
		<content:encoded><![CDATA[<p>Good point!  By the way, nice formula (on the page containing this test case) that shows how the value of the DB_FILE_MULTIBLOCK_READ_COUNT parameter is automatically derived.</p>
<p>I probably should have written that paragraph a little differently.  The comment was definitely not intended to be critical of what you wrote in this section of the book.  In the paragraph I attempted to describe how, when I was reading the test case, I should have glanced further down the page of the book to notice that you also described the possibility of leaving the DB_FILE_MULTIBLOCK_READ_COUNT parameter unset.  I also should have remembered that the book, while targeting Oracle Database 11.1, also provides very detailed information about how the behavior of the earlier Oracle Database versions differed (other books fail to do this).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian Antognini</title>
		<link>http://hoopercharles.wordpress.com/2011/10/14/what-could-go-wrong-testing-the-db_file_multiblock_read_count-parameter/#comment-4027</link>
		<dc:creator><![CDATA[Christian Antognini]]></dc:creator>
		<pubDate>Mon, 17 Oct 2011 17:18:29 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5542#comment-4027</guid>
		<description><![CDATA[Hi Charles

&gt; While reading the test case, another thought raced through my mind: why is the author
&gt; experimenting with the DB_FILE_MULTIBLOCK_READ_COUNT parameter – just leave
&gt; it unset and make certain that system statistics are collected so that the MBRC system
&gt; statistic is used

Because the engine determines the value without considering the real performance! 
Hence my advice is to perform some tests and find out what the optimal value is.

Cheers,
Chris]]></description>
		<content:encoded><![CDATA[<p>Hi Charles</p>
<p>&gt; While reading the test case, another thought raced through my mind: why is the author<br />
&gt; experimenting with the DB_FILE_MULTIBLOCK_READ_COUNT parameter – just leave<br />
&gt; it unset and make certain that system statistics are collected so that the MBRC system<br />
&gt; statistic is used</p>
<p>Because the engine determines the value without considering the real performance!<br />
Hence my advice is to perform some tests and find out what the optimal value is.</p>
<p>Cheers,<br />
Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/10/14/what-could-go-wrong-testing-the-db_file_multiblock_read_count-parameter/#comment-4021</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Sat, 15 Oct 2011 15:19:20 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5542#comment-4021</guid>
		<description><![CDATA[I have added a new section to this blog article. 

Timur, at first I thought that the DBMS_UTILITY.GET_TIME function was not functioning correctly on my operating system platform.  :-)  So, I enabled a 10046 trace and was surprised that buffered access (as you mentioned) was the cause of the unexpected test script output.

Steve - good point, automatic result caching might have been enabled - something that I had not considered.

Mohamed, good points, thanks for providing the link.  Technically, because we are forcing a full table scan through a hint, we would not need to re-collect system statistics after each change of the DB_FILE_MULTIBLOCK_READ_COUNT parameter.  I see your point about the DB_FILE_MULTIBLOCK_READ_COUNT parameter&#039;s effect on the possible maximum value for the MBRC system statistic, so there is a potential need to re-collect system statistics after changing the DB_FILE_MULTIBLOCK_READ_COUNT parameter.]]></description>
		<content:encoded><![CDATA[<p>I have added a new section to this blog article. </p>
<p>Timur, at first I thought that the DBMS_UTILITY.GET_TIME function was not functioning correctly on my operating system platform.  <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   So, I enabled a 10046 trace and was surprised that buffered access (as you mentioned) was the cause of the unexpected test script output.</p>
<p>Steve &#8211; good point, automatic result caching might have been enabled &#8211; something that I had not considered.</p>
<p>Mohamed, good points, thanks for providing the link.  Technically, because we are forcing a full table scan through a hint, we would not need to re-collect system statistics after each change of the DB_FILE_MULTIBLOCK_READ_COUNT parameter.  I see your point about the DB_FILE_MULTIBLOCK_READ_COUNT parameter&#8217;s effect on the possible maximum value for the MBRC system statistic, so there is a potential need to re-collect system statistics after changing the DB_FILE_MULTIBLOCK_READ_COUNT parameter.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/10/14/what-could-go-wrong-testing-the-db_file_multiblock_read_count-parameter/#comment-4019</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Fri, 14 Oct 2011 18:52:19 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5542#comment-4019</guid>
		<description><![CDATA[(I am keeping my comments to a minimum at this time)
Different results might be seen if you add the following just before the table statistics are gathered (and you enable a 10046 trace at level 8):
&lt;pre&gt;
ALTER SYSTEM FLUSH BUFFER_CACHE;
ALTER SYSTEM FLUSH BUFFER_CACHE;
&lt;/pre&gt;

What I found in the trace file after making the above change is what I was expecting to find, and what caused me to pause when reading this test case.  It is a good test case.]]></description>
		<content:encoded><![CDATA[<p>(I am keeping my comments to a minimum at this time)<br />
Different results might be seen if you add the following just before the table statistics are gathered (and you enable a 10046 trace at level 8):</p>
<pre>
ALTER SYSTEM FLUSH BUFFER_CACHE;
ALTER SYSTEM FLUSH BUFFER_CACHE;
</pre>
<p>What I found in the trace file after making the above change is what I was expecting to find, and what caused me to pause when reading this test case.  It is a good test case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/10/14/what-could-go-wrong-testing-the-db_file_multiblock_read_count-parameter/#comment-4018</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Fri, 14 Oct 2011 14:22:57 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5542#comment-4018</guid>
		<description><![CDATA[Hi Chris,

So far, the re-read of the book has not changed my original opinion of the book, as expressed in my original review.  The updated review is currently 5 typewritten pages long through page 178 of the book, which is about on par with my review of the &quot;Pro Oracle SQL&quot; book.  It appears that the errata for all books on the Apress site has disappeared, including the errata for your book.  If I recall correctly, you have a page on your website that is dedicated to book errata.  So that I am consistent with the practice used when reviewing other books, I will not look at that errata until my review is nearly finalized (and then likely will only mention where to find the errata).  Such an approach will hopefully provide insight into what types of problems I might have overlooked in the other book reviews, and allow the book review for the &quot;Troubleshooting Oracle Performance&quot; book to be fairly compared with my other book reviews.

--

The test case is interesting, as others have mentioned in the comments below.  I will try to not comment further in this article for at least 24 hours.]]></description>
		<content:encoded><![CDATA[<p>Hi Chris,</p>
<p>So far, the re-read of the book has not changed my original opinion of the book, as expressed in my original review.  The updated review is currently 5 typewritten pages long through page 178 of the book, which is about on par with my review of the &#8220;Pro Oracle SQL&#8221; book.  It appears that the errata for all books on the Apress site has disappeared, including the errata for your book.  If I recall correctly, you have a page on your website that is dedicated to book errata.  So that I am consistent with the practice used when reviewing other books, I will not look at that errata until my review is nearly finalized (and then likely will only mention where to find the errata).  Such an approach will hopefully provide insight into what types of problems I might have overlooked in the other book reviews, and allow the book review for the &#8220;Troubleshooting Oracle Performance&#8221; book to be fairly compared with my other book reviews.</p>
<p>&#8211;</p>
<p>The test case is interesting, as others have mentioned in the comments below.  I will try to not comment further in this article for at least 24 hours.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timur Akhmadeev</title>
		<link>http://hoopercharles.wordpress.com/2011/10/14/what-could-go-wrong-testing-the-db_file_multiblock_read_count-parameter/#comment-4017</link>
		<dc:creator><![CDATA[Timur Akhmadeev]]></dc:creator>
		<pubDate>Fri, 14 Oct 2011 10:27:51 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5542#comment-4017</guid>
		<description><![CDATA[Nice finding :) Buffered access + rounding to the second makes it closer to zero.]]></description>
		<content:encoded><![CDATA[<p>Nice finding <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Buffered access + rounding to the second makes it closer to zero.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hourim</title>
		<link>http://hoopercharles.wordpress.com/2011/10/14/what-could-go-wrong-testing-the-db_file_multiblock_read_count-parameter/#comment-4016</link>
		<dc:creator><![CDATA[hourim]]></dc:creator>
		<pubDate>Fri, 14 Oct 2011 09:41:49 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5542#comment-4016</guid>
		<description><![CDATA[1. http://hoopercharles.wordpress.com/2010/04/10/auto-tuned-db_file_multiblock_read_count-parameter/
2. shouldn&#039;t we regather system statistics (CPU costing) when we change the db_file_multiblock_read_count ?

Best regards]]></description>
		<content:encoded><![CDATA[<p>1. <a href="http://hoopercharles.wordpress.com/2010/04/10/auto-tuned-db_file_multiblock_read_count-parameter/" rel="nofollow">http://hoopercharles.wordpress.com/2010/04/10/auto-tuned-db_file_multiblock_read_count-parameter/</a><br />
2. shouldn&#8217;t we regather system statistics (CPU costing) when we change the db_file_multiblock_read_count ?</p>
<p>Best regards</p>
]]></content:encoded>
	</item>
</channel>
</rss>
