<?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: Watching Consistent Gets &#8211; 10200 Trace File Parser</title>
	<atom:link href="http://hoopercharles.wordpress.com/2011/01/24/watching-consistent-gets-10200-trace-file-parser/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoopercharles.wordpress.com/2011/01/24/watching-consistent-gets-10200-trace-file-parser/</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: Consistent get trace file parser &#171; perfexpert2</title>
		<link>http://hoopercharles.wordpress.com/2011/01/24/watching-consistent-gets-10200-trace-file-parser/#comment-3059</link>
		<dc:creator><![CDATA[Consistent get trace file parser &#171; perfexpert2]]></dc:creator>
		<pubDate>Sat, 16 Apr 2011 18:59:26 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4310#comment-3059</guid>
		<description><![CDATA[[...] to my last post, this relates to another posting  http://hoopercharles.wordpress.com/2011/01/24/watching-consistent-gets-10200-trace-file-parser. Tracing the event 10200 allows to see consistent reads. For details read linked blog entry. So now [...]]]></description>
		<content:encoded><![CDATA[<p>[...] to my last post, this relates to another posting  <a href="http://hoopercharles.wordpress.com/2011/01/24/watching-consistent-gets-10200-trace-file-parser" rel="nofollow">http://hoopercharles.wordpress.com/2011/01/24/watching-consistent-gets-10200-trace-file-parser</a>. Tracing the event 10200 allows to see consistent reads. For details read linked blog entry. So now [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sz</title>
		<link>http://hoopercharles.wordpress.com/2011/01/24/watching-consistent-gets-10200-trace-file-parser/#comment-3058</link>
		<dc:creator><![CDATA[sz]]></dc:creator>
		<pubDate>Sat, 16 Apr 2011 18:08:50 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4310#comment-3058</guid>
		<description><![CDATA[just decided, that I will no finally start blogging as well, until that&#039;s up and running, here is my post (again):

My contribution a small awk script, that allows direct parsing of the trace file output on unix (although, I actually used it on cygwin ...., so may be not 100% compatible)

The script is working with gawk and trace file 11.1.0.7; example  trace line:
ktrget2(): started for block  &lt;0x0104 : 0x09e3d4cc&gt; objd: 0x00189fa5.

In order to change to another trace file format, you just have to change $nr references in the script.

$ more cons_get_trc.awk

[sourcecode]
BEGIN { 
   FS =&quot;[ \t&lt;&gt;:]+&quot;
    print &quot;Details for file: &quot; trcfile
   print &quot;---------------------------------&quot;
   while( getline &lt; trcfile != EOF ){
      if ( $0 ~ /started for block/ ) {
      rdba[$6]+=1
      obj[$8]+=1
      both[$6&quot;,&quot;$8]+=1
      print $6 &quot; &quot; rdba[$6] &quot;, &quot; $8 &quot; &quot; obj[$8]
      }
   }
   close (trcfile)
   print &quot;&quot;

   print &quot;&quot;
   print &quot;Summary rdba and obj for file: &quot; trcfile
   print &quot;---------------------------------&quot;
   for ( var in both) {
      print var &quot; &quot; both[var]
   }

   print &quot;&quot;
   print &quot;Summary obj for file: &quot; trcfile
   print &quot;---------------------------------&quot;
   for ( var in obj ) {
      print var &quot; &quot; obj[var]
   }
}
[/sourcecode]

One third code, two thirds output. Usage demonstration,  with just a head 50 of a trace file into small.trc:

$ awk -v trcfile=small.trc -f cons_get_trc.awk

[sourcecode]
Details for file: small.trc
---------------------------------
0x09e3d4cc 1, 0x00189fa5 1
0x09fa4692 1, 0x00189fa5 2
0x0a0ac450 1, 0x00189fa5 3
0x009d94fc 1, 0x00189fa5 4
0x09fa4698 1, 0x00189fa5 5
0x009d94ff 1, 0x00189fa5 6

Summary rdba and obj for file: small.trc
---------------------------------
0x0a0ac450,0x00189fa5 1
0x09fa4698,0x00189fa5 1
0x09fa4692,0x00189fa5 1
0x009d94ff,0x00189fa5 1
0x009d94fc,0x00189fa5 1
0x09e3d4cc,0x00189fa5 1

Summary obj for file: small.trc
---------------------------------
0x00189fa5 6

[/sourcecode]]]></description>
		<content:encoded><![CDATA[<p>just decided, that I will no finally start blogging as well, until that&#8217;s up and running, here is my post (again):</p>
<p>My contribution a small awk script, that allows direct parsing of the trace file output on unix (although, I actually used it on cygwin &#8230;., so may be not 100% compatible)</p>
<p>The script is working with gawk and trace file 11.1.0.7; example  trace line:<br />
ktrget2(): started for block  &lt;0&#215;0104 : 0x09e3d4cc&gt; objd: 0x00189fa5.</p>
<p>In order to change to another trace file format, you just have to change $nr references in the script.</p>
<p>$ more cons_get_trc.awk</p>
<pre class="brush: plain; title: ; notranslate">
BEGIN { 
   FS =&quot;[ \t&lt;&gt;:]+&quot;
    print &quot;Details for file: &quot; trcfile
   print &quot;---------------------------------&quot;
   while( getline &lt; trcfile != EOF ){
      if ( $0 ~ /started for block/ ) {
      rdba[$6]+=1
      obj[$8]+=1
      both[$6&quot;,&quot;$8]+=1
      print $6 &quot; &quot; rdba[$6] &quot;, &quot; $8 &quot; &quot; obj[$8]
      }
   }
   close (trcfile)
   print &quot;&quot;

   print &quot;&quot;
   print &quot;Summary rdba and obj for file: &quot; trcfile
   print &quot;---------------------------------&quot;
   for ( var in both) {
      print var &quot; &quot; both[var]
   }

   print &quot;&quot;
   print &quot;Summary obj for file: &quot; trcfile
   print &quot;---------------------------------&quot;
   for ( var in obj ) {
      print var &quot; &quot; obj[var]
   }
}
</pre>
<p>One third code, two thirds output. Usage demonstration,  with just a head 50 of a trace file into small.trc:</p>
<p>$ awk -v trcfile=small.trc -f cons_get_trc.awk</p>
<pre class="brush: plain; title: ; notranslate">
Details for file: small.trc
---------------------------------
0x09e3d4cc 1, 0x00189fa5 1
0x09fa4692 1, 0x00189fa5 2
0x0a0ac450 1, 0x00189fa5 3
0x009d94fc 1, 0x00189fa5 4
0x09fa4698 1, 0x00189fa5 5
0x009d94ff 1, 0x00189fa5 6

Summary rdba and obj for file: small.trc
---------------------------------
0x0a0ac450,0x00189fa5 1
0x09fa4698,0x00189fa5 1
0x09fa4692,0x00189fa5 1
0x009d94ff,0x00189fa5 1
0x009d94fc,0x00189fa5 1
0x09e3d4cc,0x00189fa5 1

Summary obj for file: small.trc
---------------------------------
0x00189fa5 6

</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/01/24/watching-consistent-gets-10200-trace-file-parser/#comment-3056</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Sat, 16 Apr 2011 16:51:12 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4310#comment-3056</guid>
		<description><![CDATA[Stefan,

Please provide the missing sections in a comment and I will edit your comment above.  Thanks for taking the time to post an awk script.

On this blog the &lt;pre&gt; and &lt;/pre&gt; codes seem to work well when posting code, but &lt; and &gt; symbols may cause code to disappear.
Before posting code, please replace:
 &lt; symbols with &amp;lt ;  (without a space before the ; )
 &gt; symbols with &amp;gt ;  (without a space before the ; )]]></description>
		<content:encoded><![CDATA[<p>Stefan,</p>
<p>Please provide the missing sections in a comment and I will edit your comment above.  Thanks for taking the time to post an awk script.</p>
<p>On this blog the &lt;pre&gt; and &lt;/pre&gt; codes seem to work well when posting code, but &lt; and &gt; symbols may cause code to disappear.<br />
Before posting code, please replace:<br />
 &lt; symbols with &amp;lt ;  (without a space before the ; )<br />
 &gt; symbols with &amp;gt ;  (without a space before the ; )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stefan</title>
		<link>http://hoopercharles.wordpress.com/2011/01/24/watching-consistent-gets-10200-trace-file-parser/#comment-3054</link>
		<dc:creator><![CDATA[stefan]]></dc:creator>
		<pubDate>Sat, 16 Apr 2011 16:39:43 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4310#comment-3054</guid>
		<description><![CDATA[now i lost the last part of the trace line ...., and some typos]]></description>
		<content:encoded><![CDATA[<p>now i lost the last part of the trace line &#8230;., and some typos</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stefan</title>
		<link>http://hoopercharles.wordpress.com/2011/01/24/watching-consistent-gets-10200-trace-file-parser/#comment-3053</link>
		<dc:creator><![CDATA[stefan]]></dc:creator>
		<pubDate>Sat, 16 Apr 2011 16:35:27 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4310#comment-3053</guid>
		<description><![CDATA[last try, delete the previous ...


- a small awk script, does the trick 
- script working with gawk and trace file 11.1.0.7; example line: ktrget2(): started for block   objd: 0x00189fa5
- to change, just change the $number references

[sourcecode]
BEGIN {
   FS =&quot;[ \t&lt;&gt;:]+&quot;
   print &quot;Details for file: &quot; trcfile
   print &quot;---------------------------------&quot;
   while( getline &lt; trcfile != EOF ){
      if ( $0 ~ /started for block/ ) {
           rba[$6]+=1
           obj[$8]+=1
           both[$6&quot;,&quot;$8]+=1
           print $6 &quot; &quot; rba[$6] &quot;, &quot; $8 &quot; &quot; obj[$8]
       }
   }
   close (trcfile)
   print &quot;&quot;

   print &quot;Summary rba for file: &quot; trcfile
   print &quot;---------------------------------&quot;
   for ( var in rba ) {
      print var &quot; &quot; rba[var]
   }

   print &quot;&quot;
   print &quot;Summary obj for file: &quot; trcfile
   print &quot;---------------------------------&quot;
   for ( var in obj ) {
     print var &quot; &quot; obj[var]
   }

   print &quot;&quot;
   print &quot;Summary rdba and obj for file: &quot; trcfile
   print &quot;---------------------------------&quot;
   for ( var in both) {
     print var &quot; &quot; both[var]
   }

}
[/sourcecode]

$ awk -v trcfile=small.trc -f cons_get_trc.awk 
[sourcecode]
Details for file: small.trc
---------------------------------
0x09e3d4cc 1, 0x00189fa5 1
0x09fa4692 1, 0x00189fa5 2
0x0a0ac450 1, 0x00189fa5 3
0x009d94fc 1, 0x00189fa5 4
0x09fa4698 1, 0x00189fa5 5
0x009d94ff 1, 0x00189fa5 6

Summary rba for file: small.trc
---------------------------------
0x09fa4692 1
0x009d94ff 1
0x09fa4698 1
0x0a0ac450 1
0x09e3d4cc 1
0x009d94fc 1

Summary obj for file: small.trc
---------------------------------
0x00189fa5 6

Summary rdba and obj for file: small.trc
---------------------------------
0x0a0ac450,0x00189fa5 1
0x09fa4698,0x00189fa5 1
0x09fa4692,0x00189fa5 1
0x009d94ff,0x00189fa5 1
0x009d94fc,0x00189fa5 1
0x09e3d4cc,0x00189fa5 1
[/sourcecode]]]></description>
		<content:encoded><![CDATA[<p>last try, delete the previous &#8230;</p>
<p>- a small awk script, does the trick<br />
- script working with gawk and trace file 11.1.0.7; example line: ktrget2(): started for block   objd: 0x00189fa5<br />
- to change, just change the $number references</p>
<pre class="brush: plain; title: ; notranslate">
BEGIN {
   FS =&quot;[ \t&lt;&gt;:]+&quot;
   print &quot;Details for file: &quot; trcfile
   print &quot;---------------------------------&quot;
   while( getline &lt; trcfile != EOF ){
      if ( $0 ~ /started for block/ ) {
           rba[$6]+=1
           obj[$8]+=1
           both[$6&quot;,&quot;$8]+=1
           print $6 &quot; &quot; rba[$6] &quot;, &quot; $8 &quot; &quot; obj[$8]
       }
   }
   close (trcfile)
   print &quot;&quot;

   print &quot;Summary rba for file: &quot; trcfile
   print &quot;---------------------------------&quot;
   for ( var in rba ) {
      print var &quot; &quot; rba[var]
   }

   print &quot;&quot;
   print &quot;Summary obj for file: &quot; trcfile
   print &quot;---------------------------------&quot;
   for ( var in obj ) {
     print var &quot; &quot; obj[var]
   }

   print &quot;&quot;
   print &quot;Summary rdba and obj for file: &quot; trcfile
   print &quot;---------------------------------&quot;
   for ( var in both) {
     print var &quot; &quot; both[var]
   }

}
</pre>
<p>$ awk -v trcfile=small.trc -f cons_get_trc.awk </p>
<pre class="brush: plain; title: ; notranslate">
Details for file: small.trc
---------------------------------
0x09e3d4cc 1, 0x00189fa5 1
0x09fa4692 1, 0x00189fa5 2
0x0a0ac450 1, 0x00189fa5 3
0x009d94fc 1, 0x00189fa5 4
0x09fa4698 1, 0x00189fa5 5
0x009d94ff 1, 0x00189fa5 6

Summary rba for file: small.trc
---------------------------------
0x09fa4692 1
0x009d94ff 1
0x09fa4698 1
0x0a0ac450 1
0x09e3d4cc 1
0x009d94fc 1

Summary obj for file: small.trc
---------------------------------
0x00189fa5 6

Summary rdba and obj for file: small.trc
---------------------------------
0x0a0ac450,0x00189fa5 1
0x09fa4698,0x00189fa5 1
0x09fa4692,0x00189fa5 1
0x009d94ff,0x00189fa5 1
0x009d94fc,0x00189fa5 1
0x09e3d4cc,0x00189fa5 1
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thiago Maciel</title>
		<link>http://hoopercharles.wordpress.com/2011/01/24/watching-consistent-gets-10200-trace-file-parser/#comment-2741</link>
		<dc:creator><![CDATA[Thiago Maciel]]></dc:creator>
		<pubDate>Tue, 25 Jan 2011 02:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4310#comment-2741</guid>
		<description><![CDATA[Charles,

So, according to your results our guesses related to ‘buffer is pinned count’ might be not right. I was running the test in my desktop (Windows XP running 11.2.0.1) and i got some results:

1) even when the OPTIMIZER_FEATURES_ENABLE is set to &#039;10.2.0.4&#039;, the query returned 215 BG instead of 408 BG in my tests, still don&#039;t know why.
2) reading http://blog.tanelpoder.com/2009/11/19/finding-the-reasons-for-excessive-logical-ios/, tanel says the quote below:
&quot;These buffer get reason counters are not maintained properly in Oracle 11g, probably due an optimization effort and some changes for faster pinning of buffer cache buffers (there’s a parameter called _fastpin_enable which is set to 1 in 11g and it enables so called fastpath buffer gets. If you see v$sesstat statistics such “consistent gets from cache (fastpath) or “db block gets from cache (fastpath)” being inremented, then fastpath buffer gets/pins are used. Note that I do have a script which works also on 11g but I’ll write about that one some time in the future :) &quot;

Said that, i changed the &#039;_fastpin_enable&#039; to 0 and still got the same results.

So, Oracle is hiding something in version 11g :)

Cheers!]]></description>
		<content:encoded><![CDATA[<p>Charles,</p>
<p>So, according to your results our guesses related to ‘buffer is pinned count’ might be not right. I was running the test in my desktop (Windows XP running 11.2.0.1) and i got some results:</p>
<p>1) even when the OPTIMIZER_FEATURES_ENABLE is set to &#8217;10.2.0.4&#8242;, the query returned 215 BG instead of 408 BG in my tests, still don&#8217;t know why.<br />
2) reading <a href="http://blog.tanelpoder.com/2009/11/19/finding-the-reasons-for-excessive-logical-ios/" rel="nofollow">http://blog.tanelpoder.com/2009/11/19/finding-the-reasons-for-excessive-logical-ios/</a>, tanel says the quote below:<br />
&#8220;These buffer get reason counters are not maintained properly in Oracle 11g, probably due an optimization effort and some changes for faster pinning of buffer cache buffers (there’s a parameter called _fastpin_enable which is set to 1 in 11g and it enables so called fastpath buffer gets. If you see v$sesstat statistics such “consistent gets from cache (fastpath) or “db block gets from cache (fastpath)” being inremented, then fastpath buffer gets/pins are used. Note that I do have a script which works also on 11g but I’ll write about that one some time in the future <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  &#8221;</p>
<p>Said that, i changed the &#8216;_fastpin_enable&#8217; to 0 and still got the same results.</p>
<p>So, Oracle is hiding something in version 11g <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/01/24/watching-consistent-gets-10200-trace-file-parser/#comment-2740</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Tue, 25 Jan 2011 00:38:15 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4310#comment-2740</guid>
		<description><![CDATA[OK, I took another look at my results - I need to look at something other than the &#039;buffer is pinned count&#039; statistic.

&lt;pre&gt;
ALTER SESSION SET OPTIMIZER_FEATURES_ENABLE=&#039;10.2.0.4&#039;;
 
COLUMN NAME FORMAT A38
 
SELECT
  NAME,
  VALUE
FROM
  V$MYSTAT M,
  V$STATNAME S
WHERE
  (NAME LIKE &#039;consistent%&#039;
    OR NAME LIKE &#039;buffer%&#039;)
  AND M.STATISTIC#=S.STATISTIC#;
 
SELECT /*+ GATHER_PLAN_STATISTICS LEADING(T1) USE_NL(T2) INDEX(T1) INDEX(T2) */
  T1.ID,
  T1.N1,
  T2.ID,
  T2.N1
FROM
  T1,
  T2
WHERE
  T1.ID=T2.ID
  AND T1.ID BETWEEN 1 AND 200
  AND T2.N1 = 0;
  
SELECT
  NAME,
  VALUE
FROM
  V$MYSTAT M,
  V$STATNAME S
WHERE
  (NAME LIKE &#039;consistent%&#039;
    OR NAME LIKE &#039;buffer%&#039;)
  AND M.STATISTIC#=S.STATISTIC#;
&lt;/pre&gt;

The results:
10.2.0.5:
&lt;pre&gt;
NAME                                        VALUE
-------------------------------------- ----------
consistent gets                                44
consistent gets from cache                     44
consistent gets - examination                   3
consistent gets direct                          0
consistent changes                              0
buffer is pinned count                         37
buffer is not pinned count                      7
 
NAME                                        VALUE
-------------------------------------- ----------
consistent gets                               452  /* +408 */
consistent gets from cache                    452  /* +408 */
consistent gets - examination                 405  /* +402 */
consistent gets direct                          0
consistent changes                              0
buffer is pinned count                        630  /* +593 */
buffer is not pinned count                    413  /* +406 */
&lt;/pre&gt;

11.2.0.2:
&lt;pre&gt;
NAME                                        VALUE
-------------------------------------- ----------
consistent gets                                37
consistent gets from cache                     37
consistent gets from cache (fastpath)          32
consistent gets - examination                   4
consistent gets direct                          0
consistent changes                              0
buffer is pinned count                         12
buffer is not pinned count                      8
 
NAME                                        VALUE
-------------------------------------- ----------
consistent gets                               252  /* +215 */
consistent gets from cache                    252  /* +215 */
consistent gets from cache (fastpath)          39  /* +  7 */
consistent gets - examination                 212  /* +208 */
consistent gets direct                          0
consistent changes                              0
buffer is pinned count                        410  /* +498 */
buffer is not pinned count                    416  /* +408 */
&lt;/pre&gt;

The above shows that the &#039;buffer is pinned count&#039; increased by 593 on Oracle Database 10.2.0.5, and 498 (95 less) on Oracle Database 11.2.0.2.  I would have expected that statistic would be about 190 higher on 11.2.0.2 than on 10.2.0.5.]]></description>
		<content:encoded><![CDATA[<p>OK, I took another look at my results &#8211; I need to look at something other than the &#8216;buffer is pinned count&#8217; statistic.</p>
<pre>
ALTER SESSION SET OPTIMIZER_FEATURES_ENABLE='10.2.0.4';
 
COLUMN NAME FORMAT A38
 
SELECT
  NAME,
  VALUE
FROM
  V$MYSTAT M,
  V$STATNAME S
WHERE
  (NAME LIKE 'consistent%'
    OR NAME LIKE 'buffer%')
  AND M.STATISTIC#=S.STATISTIC#;
 
SELECT /*+ GATHER_PLAN_STATISTICS LEADING(T1) USE_NL(T2) INDEX(T1) INDEX(T2) */
  T1.ID,
  T1.N1,
  T2.ID,
  T2.N1
FROM
  T1,
  T2
WHERE
  T1.ID=T2.ID
  AND T1.ID BETWEEN 1 AND 200
  AND T2.N1 = 0;
  
SELECT
  NAME,
  VALUE
FROM
  V$MYSTAT M,
  V$STATNAME S
WHERE
  (NAME LIKE 'consistent%'
    OR NAME LIKE 'buffer%')
  AND M.STATISTIC#=S.STATISTIC#;
</pre>
<p>The results:<br />
10.2.0.5:</p>
<pre>
NAME                                        VALUE
-------------------------------------- ----------
consistent gets                                44
consistent gets from cache                     44
consistent gets - examination                   3
consistent gets direct                          0
consistent changes                              0
buffer is pinned count                         37
buffer is not pinned count                      7
 
NAME                                        VALUE
-------------------------------------- ----------
consistent gets                               452  /* +408 */
consistent gets from cache                    452  /* +408 */
consistent gets - examination                 405  /* +402 */
consistent gets direct                          0
consistent changes                              0
buffer is pinned count                        630  /* +593 */
buffer is not pinned count                    413  /* +406 */
</pre>
<p>11.2.0.2:</p>
<pre>
NAME                                        VALUE
-------------------------------------- ----------
consistent gets                                37
consistent gets from cache                     37
consistent gets from cache (fastpath)          32
consistent gets - examination                   4
consistent gets direct                          0
consistent changes                              0
buffer is pinned count                         12
buffer is not pinned count                      8
 
NAME                                        VALUE
-------------------------------------- ----------
consistent gets                               252  /* +215 */
consistent gets from cache                    252  /* +215 */
consistent gets from cache (fastpath)          39  /* +  7 */
consistent gets - examination                 212  /* +208 */
consistent gets direct                          0
consistent changes                              0
buffer is pinned count                        410  /* +498 */
buffer is not pinned count                    416  /* +408 */
</pre>
<p>The above shows that the &#8216;buffer is pinned count&#8217; increased by 593 on Oracle Database 10.2.0.5, and 498 (95 less) on Oracle Database 11.2.0.2.  I would have expected that statistic would be about 190 higher on 11.2.0.2 than on 10.2.0.5.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/01/24/watching-consistent-gets-10200-trace-file-parser/#comment-2739</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Tue, 25 Jan 2011 00:05:39 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4310#comment-2739</guid>
		<description><![CDATA[Coskan,

Good that someone is actually trying the test.  Sorry if it was not clear if you need to change the value of OPTIMIZER_FEATURES_ENABLE for the 11.2.0.2 execution.  Yes, that setting is necessary to eliminate the second NESTED LOOPS join.  So, the script to run the execution plan (somewhere near the top of this article is:
&lt;pre&gt;
ALTER SESSION SET OPTIMIZER_FEATURES_ENABLE=&#039;10.2.0.4&#039;;
 
SELECT /*+ GATHER_PLAN_STATISTICS LEADING(T1) USE_NL(T2) INDEX(T1) INDEX(T2) */
  T1.ID,
  T1.N1,
  T2.ID,
  T2.N1
FROM
  T1,
  T2
WHERE
  T1.ID=T2.ID
  AND T1.ID BETWEEN 1 AND 200
  AND T2.N1 = 0;
 
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,&#039;ALLSTATS LAST -ROWS -PREDICATE&#039;)); 
&lt;/pre&gt;

Of course, when you perform the 10200 trace, the changed value for OPTIMIZER_FEATURES_ENABLE should still be set.]]></description>
		<content:encoded><![CDATA[<p>Coskan,</p>
<p>Good that someone is actually trying the test.  Sorry if it was not clear if you need to change the value of OPTIMIZER_FEATURES_ENABLE for the 11.2.0.2 execution.  Yes, that setting is necessary to eliminate the second NESTED LOOPS join.  So, the script to run the execution plan (somewhere near the top of this article is:</p>
<pre>
ALTER SESSION SET OPTIMIZER_FEATURES_ENABLE='10.2.0.4';
 
SELECT /*+ GATHER_PLAN_STATISTICS LEADING(T1) USE_NL(T2) INDEX(T1) INDEX(T2) */
  T1.ID,
  T1.N1,
  T2.ID,
  T2.N1
FROM
  T1,
  T2
WHERE
  T1.ID=T2.ID
  AND T1.ID BETWEEN 1 AND 200
  AND T2.N1 = 0;
 
SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL,NULL,'ALLSTATS LAST -ROWS -PREDICATE')); 
</pre>
<p>Of course, when you perform the 10200 trace, the changed value for OPTIMIZER_FEATURES_ENABLE should still be set.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: coskan</title>
		<link>http://hoopercharles.wordpress.com/2011/01/24/watching-consistent-gets-10200-trace-file-parser/#comment-2738</link>
		<dc:creator><![CDATA[coskan]]></dc:creator>
		<pubDate>Mon, 24 Jan 2011 23:39:58 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4310#comment-2738</guid>
		<description><![CDATA[Question 

How come you did not get the new  extra nested loop when you run it on 11.2.0.2  (&lt;a href=&quot;http://download.oracle.com/docs/cd/E11882_01/server.112/e16638/optimops.htm#sthref954&quot; rel=&quot;nofollow&quot;&gt;reference_link&lt;/a&gt;). 
&lt;pre&gt;
PLAN_TABLE_OUTPUT
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL_ID  3v5y2pjq60zzd, child number 0
-------------------------------------
SELECT /*+ GATHER_PLAN_STATISTICS LEADING(T1) USE_NL(T2) INDEX(T1)
INDEX(T2) */ /*test_11201*/   T1.ID,   T1.N1,   T2.ID,   T2.N1 FROM
T1,   T2 WHERE   T1.ID=T2.ID   AND T1.ID BETWEEN 1 AND 200   AND T2.N1
= 0

Plan hash value: 2303960507

----------------------------------------------------------------------------------------
&#124; Id  &#124; Operation                     &#124; Name   &#124; Rows  &#124; Bytes &#124; Cost (%CPU)&#124; Time     &#124;
----------------------------------------------------------------------------------------
&#124;   0 &#124; SELECT STATEMENT              &#124;        &#124;       &#124;       &#124;   206 (100)&#124;          &#124;
&#124;   1 &#124;  NESTED LOOPS                 &#124;        &#124;       &#124;       &#124;            &#124;          &#124;
&#124;   2 &#124;   NESTED LOOPS                &#124;        &#124;     1 &#124;    20 &#124;   206   (0)&#124; 00:00:02 &#124;
&#124;   3 &#124;    TABLE ACCESS BY INDEX ROWID&#124; T1     &#124;   200 &#124;  2000 &#124;     6   (0)&#124; 00:00:01 &#124;
&#124;*  4 &#124;     INDEX RANGE SCAN          &#124; PAR_I1 &#124;   200 &#124;       &#124;     2   (0)&#124; 00:00:01 &#124;
&#124;*  5 &#124;    INDEX UNIQUE SCAN          &#124; CHI_I1 &#124;     1 &#124;       &#124;     0   (0)&#124;          &#124;
&#124;*  6 &#124;   TABLE ACCESS BY INDEX ROWID &#124; T2     &#124;     1 &#124;    10 &#124;     1   (0)&#124; 00:00:01 &#124;
----------------------------------------------------------------------------------------

&lt;/pre&gt;
My tests on 11.2.0.1 generates the new extra nested loop



Were you still under optimizer_features_enable=10.2.0.4]]></description>
		<content:encoded><![CDATA[<p>Question </p>
<p>How come you did not get the new  extra nested loop when you run it on 11.2.0.2  (<a href="http://download.oracle.com/docs/cd/E11882_01/server.112/e16638/optimops.htm#sthref954" rel="nofollow">reference_link</a>). </p>
<pre>
PLAN_TABLE_OUTPUT
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL_ID  3v5y2pjq60zzd, child number 0
-------------------------------------
SELECT /*+ GATHER_PLAN_STATISTICS LEADING(T1) USE_NL(T2) INDEX(T1)
INDEX(T2) */ /*test_11201*/   T1.ID,   T1.N1,   T2.ID,   T2.N1 FROM
T1,   T2 WHERE   T1.ID=T2.ID   AND T1.ID BETWEEN 1 AND 200   AND T2.N1
= 0

Plan hash value: 2303960507

----------------------------------------------------------------------------------------
| Id  | Operation                     | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
----------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT              |        |       |       |   206 (100)|          |
|   1 |  NESTED LOOPS                 |        |       |       |            |          |
|   2 |   NESTED LOOPS                |        |     1 |    20 |   206   (0)| 00:00:02 |
|   3 |    TABLE ACCESS BY INDEX ROWID| T1     |   200 |  2000 |     6   (0)| 00:00:01 |
|*  4 |     INDEX RANGE SCAN          | PAR_I1 |   200 |       |     2   (0)| 00:00:01 |
|*  5 |    INDEX UNIQUE SCAN          | CHI_I1 |     1 |       |     0   (0)|          |
|*  6 |   TABLE ACCESS BY INDEX ROWID | T2     |     1 |    10 |     1   (0)| 00:00:01 |
----------------------------------------------------------------------------------------

</pre>
<p>My tests on 11.2.0.1 generates the new extra nested loop</p>
<p>Were you still under optimizer_features_enable=10.2.0.4</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/01/24/watching-consistent-gets-10200-trace-file-parser/#comment-2735</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Mon, 24 Jan 2011 17:16:04 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=4310#comment-2735</guid>
		<description><![CDATA[Thiago,

I think that you are right.  There is a statistic with the name &#039;buffer is pinned count&#039;, and the amount by which this increased for the session on 10.2.0.5 and 11.2.0.2 was different - I ran out of time and was not able to spend much time comparing the differences, but I will check again later.  Tanel Poder has an excellent write up on this statistic, part of which is quoted below:
http://blog.tanelpoder.com/2010/01/15/beyond-oracle-wait-interface-part-2/
&lt;blockquote&gt;
&quot;However, check the value for buffer is pinned count statistic! This counter is updated every time we go to a buffer to get some data from it AND it already happens to be open by my session! Oracle keeps buffers pinned  and relevant buffer handles cached during a database call in some cases (like nested loop joins and index scans) to avoid reopening the buffer again (getting a buffer again if its closed would mean another logical IO).&quot;
&lt;/blockquote&gt;

It appears that 11.2.0.2 is much more intelligent with how index blocks are pinned, quickly pinning the index leaf blocks of the index belonging to the inner table in the nested looks join, while 10.2.0.5 did not pin these blocks.  This increased willingness to pin observation of course is based on very limited testing, and might not apply to other situations.  I welcome other people to test and report their findings - maybe it only happens in small index structures?]]></description>
		<content:encoded><![CDATA[<p>Thiago,</p>
<p>I think that you are right.  There is a statistic with the name &#8216;buffer is pinned count&#8217;, and the amount by which this increased for the session on 10.2.0.5 and 11.2.0.2 was different &#8211; I ran out of time and was not able to spend much time comparing the differences, but I will check again later.  Tanel Poder has an excellent write up on this statistic, part of which is quoted below:<br />
<a href="http://blog.tanelpoder.com/2010/01/15/beyond-oracle-wait-interface-part-2/" rel="nofollow">http://blog.tanelpoder.com/2010/01/15/beyond-oracle-wait-interface-part-2/</a></p>
<blockquote><p>
&#8220;However, check the value for buffer is pinned count statistic! This counter is updated every time we go to a buffer to get some data from it AND it already happens to be open by my session! Oracle keeps buffers pinned  and relevant buffer handles cached during a database call in some cases (like nested loop joins and index scans) to avoid reopening the buffer again (getting a buffer again if its closed would mean another logical IO).&#8221;
</p></blockquote>
<p>It appears that 11.2.0.2 is much more intelligent with how index blocks are pinned, quickly pinning the index leaf blocks of the index belonging to the inner table in the nested looks join, while 10.2.0.5 did not pin these blocks.  This increased willingness to pin observation of course is based on very limited testing, and might not apply to other situations.  I welcome other people to test and report their findings &#8211; maybe it only happens in small index structures?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
