<?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: Which PLAN_HASH_VALUE Appears in V$SQLAREA?</title>
	<atom:link href="http://hoopercharles.wordpress.com/2012/03/28/which-plan_hash_value-appears-in-vsqlarea/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoopercharles.wordpress.com/2012/03/28/which-plan_hash_value-appears-in-vsqlarea/</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: Mich Talebzadeh</title>
		<link>http://hoopercharles.wordpress.com/2012/03/28/which-plan_hash_value-appears-in-vsqlarea/#comment-4692</link>
		<dc:creator><![CDATA[Mich Talebzadeh]]></dc:creator>
		<pubDate>Sun, 20 May 2012 17:28:57 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6215#comment-4692</guid>
		<description><![CDATA[Actually this work of mine was related to comparing a typical OLTP load on Solid State Disks (SSD) vs the same load on normal hard disks (HDD) for &quot;writes&quot;.  So using the script that I explained earier I simulated UPDATES/DELETES/INSERTS via index search. In our case we are processing 100 rows at a time.Now typically the UPDATES and DELETES affect 1000,000 existing rows in table testwrites. But remember that tdash has 1.7 million rows and above 1000,000 UPDATE AND DELETES return zero rows. However, INSERT will happen. So it total a million rows (in chuncks of 100 rows at a time) will be UPDATED, DELETED and RE-INSERTED. Above 1000,000 only INSERTS will happen and obviously index rows will be added. So there will be plenty of recursive rows.

So if I run the whole thing (UPDATES/DELETES/INSERTS) and look at the number of recursive statement for HDD I get
&lt;pre&gt;
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS

call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse    52982      0.23       0.47          3         19          0           0
Execute 105787    141.17    4308.08    3564902   12708368   43266845     3729575
Fetch    21254      0.22       3.72       4380      29023          0     1733335
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total   180023    141.63    4312.28    3569285   12737410   43266845     5462910

Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  db file sequential read                   3260950        1.57       3660.65
  db file scattered read                      55729        0.57        244.64

    4321  elapsed seconds in trace file.
&lt;/pre&gt;

That 4,321 elapsed seconds includes 4,312.28 sec from recursive statements plus 9.15 sec for non-recursive statements (not shown). These recursive statements occurred because of dynamic storage extension. Dynamic storage extension occurred in our case because table testwrites and its index had to extend beyond their allocated space (that is, new extents were allocated). The wait times included 3,660.65 sec for db file sequential reads and 244.64 sec waits for db file scattered reads.

Now this summary seems to be correct. However, it typically does not answer (at least directly) the throughput of writes. Not suprising noone waits for writes. So I wanted to devise a mechanisom for measuring writes (exclusing ORION or other scripts). I thought abou it and decided to use AWR for this purpose. Went back to my original script and used checkpoint prior and following PL/SQL block and with snapshot
&lt;pre&gt;
ALTER SYSTEM CHECKPOINT;
EXEC DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT();
DECLARE
        type ObjIdArray is table of tdash.object_id%TYPE index by binary_integer;
        l_ids objIdArray;
        CURSOR c IS SELECT object_id FROM tdash;
BEGIN
        OPEN c;
        LOOP
                BEGIN
                        FETCH c BULK COLLECT INTO l_ids LIMIT 100;

                        FORALL rs in 1 .. l_ids.COUNT
                                UPDATE testwrites
                                  SET PADDING1 =  RPAD(&#039;y&#039;,4000,&#039;y&#039;)
                                WHERE object_id = l_ids(rs);
                        commit;
                        FORALL rs in 1 .. l_ids.COUNT
                                DELETE FROM testwrites
                                WHERE object_id = l_ids(rs);
                        commit;
                        FORALL rs in 1 .. l_ids.COUNT
                                INSERT INTO testwrites
                                SELECT * FROM tdash t WHERE t.object_id = l_ids(rs);
                        commit;
                        EXIT WHEN C%NOTFOUND;
                EXCEPTION
                  WHEN NO_DATA_FOUND THEN
                    NULL;
                  WHEN OTHERS THEN
                    DBMS_OUTPUT.PUT_LINE(&#039;Transaction failed&#039;);
                END;
        END LOOP;
        CLOSE c;
END;
/
ALTER SYSTEM CHECKPOINT;
EXEC DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT();
&lt;/pre&gt;
Now I can work out the volume of redos and writes generated (another topic for itself). Also for clarity with SSD tests redo files were on SSD. With HDD tests redo files were put on HDD. So after a bit of head scratching with tkprof output, I decided to look at the overall statistics for PL/SQL block. just compare the SQL execute times pretty much as they are taken at the highest level (like outside of the loop).

Cheers,

Mich]]></description>
		<content:encoded><![CDATA[<p>Actually this work of mine was related to comparing a typical OLTP load on Solid State Disks (SSD) vs the same load on normal hard disks (HDD) for &#8220;writes&#8221;.  So using the script that I explained earier I simulated UPDATES/DELETES/INSERTS via index search. In our case we are processing 100 rows at a time.Now typically the UPDATES and DELETES affect 1000,000 existing rows in table testwrites. But remember that tdash has 1.7 million rows and above 1000,000 UPDATE AND DELETES return zero rows. However, INSERT will happen. So it total a million rows (in chuncks of 100 rows at a time) will be UPDATED, DELETED and RE-INSERTED. Above 1000,000 only INSERTS will happen and obviously index rows will be added. So there will be plenty of recursive rows.</p>
<p>So if I run the whole thing (UPDATES/DELETES/INSERTS) and look at the number of recursive statement for HDD I get</p>
<pre>
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS

call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse    52982      0.23       0.47          3         19          0           0
Execute 105787    141.17    4308.08    3564902   12708368   43266845     3729575
Fetch    21254      0.22       3.72       4380      29023          0     1733335
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total   180023    141.63    4312.28    3569285   12737410   43266845     5462910

Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  db file sequential read                   3260950        1.57       3660.65
  db file scattered read                      55729        0.57        244.64

    4321  elapsed seconds in trace file.
</pre>
<p>That 4,321 elapsed seconds includes 4,312.28 sec from recursive statements plus 9.15 sec for non-recursive statements (not shown). These recursive statements occurred because of dynamic storage extension. Dynamic storage extension occurred in our case because table testwrites and its index had to extend beyond their allocated space (that is, new extents were allocated). The wait times included 3,660.65 sec for db file sequential reads and 244.64 sec waits for db file scattered reads.</p>
<p>Now this summary seems to be correct. However, it typically does not answer (at least directly) the throughput of writes. Not suprising noone waits for writes. So I wanted to devise a mechanisom for measuring writes (exclusing ORION or other scripts). I thought abou it and decided to use AWR for this purpose. Went back to my original script and used checkpoint prior and following PL/SQL block and with snapshot</p>
<pre>
ALTER SYSTEM CHECKPOINT;
EXEC DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT();
DECLARE
        type ObjIdArray is table of tdash.object_id%TYPE index by binary_integer;
        l_ids objIdArray;
        CURSOR c IS SELECT object_id FROM tdash;
BEGIN
        OPEN c;
        LOOP
                BEGIN
                        FETCH c BULK COLLECT INTO l_ids LIMIT 100;

                        FORALL rs in 1 .. l_ids.COUNT
                                UPDATE testwrites
                                  SET PADDING1 =  RPAD('y',4000,'y')
                                WHERE object_id = l_ids(rs);
                        commit;
                        FORALL rs in 1 .. l_ids.COUNT
                                DELETE FROM testwrites
                                WHERE object_id = l_ids(rs);
                        commit;
                        FORALL rs in 1 .. l_ids.COUNT
                                INSERT INTO testwrites
                                SELECT * FROM tdash t WHERE t.object_id = l_ids(rs);
                        commit;
                        EXIT WHEN C%NOTFOUND;
                EXCEPTION
                  WHEN NO_DATA_FOUND THEN
                    NULL;
                  WHEN OTHERS THEN
                    DBMS_OUTPUT.PUT_LINE('Transaction failed');
                END;
        END LOOP;
        CLOSE c;
END;
/
ALTER SYSTEM CHECKPOINT;
EXEC DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT();
</pre>
<p>Now I can work out the volume of redos and writes generated (another topic for itself). Also for clarity with SSD tests redo files were on SSD. With HDD tests redo files were put on HDD. So after a bit of head scratching with tkprof output, I decided to look at the overall statistics for PL/SQL block. just compare the SQL execute times pretty much as they are taken at the highest level (like outside of the loop).</p>
<p>Cheers,</p>
<p>Mich</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mich Talebzadeh</title>
		<link>http://hoopercharles.wordpress.com/2012/03/28/which-plan_hash_value-appears-in-vsqlarea/#comment-4691</link>
		<dc:creator><![CDATA[Mich Talebzadeh]]></dc:creator>
		<pubDate>Sun, 20 May 2012 16:58:05 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6215#comment-4691</guid>
		<description><![CDATA[Thanks Charles. I am looking at your output and doing some more of my own investigation.

FYI, My version of tkprof is

&lt;pre&gt;
TKPROF: Release 11.2.0.1.0 
&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>Thanks Charles. I am looking at your output and doing some more of my own investigation.</p>
<p>FYI, My version of tkprof is</p>
<pre>
TKPROF: Release 11.2.0.1.0 
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2012/03/28/which-plan_hash_value-appears-in-vsqlarea/#comment-4690</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Sun, 20 May 2012 16:03:19 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6215#comment-4690</guid>
		<description><![CDATA[I think that I have the answer regarding why tkprof states that the elapsed time is 1.42 seconds, while my program claims that the elapsed time is 3.683344 seconds.  I forsee a new blog article.]]></description>
		<content:encoded><![CDATA[<p>I think that I have the answer regarding why tkprof states that the elapsed time is 1.42 seconds, while my program claims that the elapsed time is 3.683344 seconds.  I forsee a new blog article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2012/03/28/which-plan_hash_value-appears-in-vsqlarea/#comment-4689</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Sun, 20 May 2012 15:29:13 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6215#comment-4689</guid>
		<description><![CDATA[The test case that I used to produce the above output had a unique index on the OBJECT_ID column of table T1, but not the OBJECT_ID column of table T2.  Below is the output from tkprof with the index on table T2:
&lt;pre&gt;
SQL ID: 1ahnbczb20gdx
Plan Hash: 1751280057
UPDATE T2 SET PADDING1 = RPAD(&#039;y&#039;,4000,&#039;y&#039;) 
WHERE
 OBJECT_ID = :B1 


call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.00          0          0          0           0
Execute    190      1.35       1.42        348      52552     165435       19000
Fetch        0      0.00       0.00          0          0          0           0
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total      191      1.35       1.42        348      52552     165435       19000

Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 64     (recursive depth: 1)
Number of plan statistics captured: 1

Rows (1st) Rows (avg) Rows (max)  Row Source Operation
---------- ---------- ----------  ---------------------------------------------------
         0          0          0  UPDATE  T2 (cr=332 pr=30 pw=0 time=19223 us)
       100        100        100   INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=8 pw=0 time=1372 us cost=1 size=2015 card=1)(object id 103855)
         0          0          0  UPDATE  T2 (cr=288 pr=2 pw=0 time=8629 us)
       100        100        100   INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=0 pw=0 time=430 us cost=1 size=2015 card=1)(object id 103855)
         0          0          0  UPDATE  T2 (cr=294 pr=2 pw=0 time=8961 us)
       100        100        100   INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=0 pw=0 time=438 us cost=1 size=2015 card=1)(object id 103855)
...
         0          0          0  UPDATE  T2 (cr=294 pr=0 pw=0 time=6507 us)
       100        100        100   INDEX UNIQUE SCAN IND_T2_OBJ (cr=111 pr=0 pw=0 time=440 us cost=1 size=2015 card=1)(object id 103855)
         0          0          0  UPDATE  T2 (cr=291 pr=0 pw=0 time=6051 us)
       100        100        100   INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=0 pw=0 time=430 us cost=1 size=2015 card=1)(object id 103855)


Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  db file scattered read                         40        0.00          0.03
  db file sequential read                        32        0.00          0.01
&lt;/pre&gt;

And the output from my program:
&lt;pre&gt;
Statement Depth 1 (Trigger Code)
Cursor 910   Ver 1   Parse at 0.187068 SQL_ID=&#039;1ahnbczb20gdx&#039;  (TD Prev 0.000996)  Similar Cnt 1
&#124;PARSEs       1&#124;CPU S    0.000000&#124;CLOCK S    0.000162&#124;ROWs        0&#124;PHY RD BLKs         0&#124;CON RD BLKs (Mem)         0&#124;CUR RD BLKs (Mem)         0&#124;SHARED POOL MISs      1&#124;
&#124;EXECs      600&#124;CPU S    3.603618&#124;CLOCK S    3.683344&#124;ROWs    50000&#124;PHY RD BLKs       912&#124;CON RD BLKs (Mem)    144826&#124;CUR RD BLKs (Mem)    426496&#124;SHARED POOL MISs      1&#124;
&#124;FETCHs       0&#124;CPU S    0.000000&#124;CLOCK S    0.000000&#124;ROWs        0&#124;PHY RD BLKs         0&#124;CON RD BLKs (Mem)         0&#124;CUR RD BLKs (Mem)         0&#124;SHARED POOL MISs      0&#124;
  CPU S 16.91%  CLOCK S 15.45%
&#124;                 +++&#124;&#124;                 +++&#124;
UPDATE T2 SET PADDING1 = RPAD(&#039;y&#039;,4000,&#039;y&#039;) WHERE OBJECT_ID = :B1

       (Rows 0)   UPDATE  T2 (cr=332 pr=30 pw=0 time=19223 us)
     (Rows 100)    INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=8 pw=0 time=1372 us cost=1 size=2015 card=1)

       (Rows 0)   UPDATE  T2 (cr=288 pr=2 pw=0 time=8629 us)
     (Rows 100)    INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=0 pw=0 time=430 us cost=1 size=2015 card=1)

       (Rows 0)   UPDATE  T2 (cr=294 pr=2 pw=0 time=8961 us)
     (Rows 100)    INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=0 pw=0 time=438 us cost=1 size=2015 card=1)
...
       (Rows 0)   UPDATE  T2 (cr=105 pr=0 pw=0 time=221 us)
       (Rows 0)    INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=0 pw=0 time=174 us cost=1 size=2015 card=1)

       (Rows 0)   UPDATE  T2 (cr=105 pr=0 pw=0 time=193 us)
       (Rows 0)    INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=0 pw=0 time=153 us cost=1 size=2015 card=1)
&lt;/pre&gt;

Notice now that the elapsed time is just less than half of what my program outputs, while the numbers were very close when a full table scan was the only option.  The same is true for the CPU time.  I might have to experiment a bit more to see what is happening.]]></description>
		<content:encoded><![CDATA[<p>The test case that I used to produce the above output had a unique index on the OBJECT_ID column of table T1, but not the OBJECT_ID column of table T2.  Below is the output from tkprof with the index on table T2:</p>
<pre>
SQL ID: 1ahnbczb20gdx
Plan Hash: 1751280057
UPDATE T2 SET PADDING1 = RPAD('y',4000,'y') 
WHERE
 OBJECT_ID = :B1 


call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.00          0          0          0           0
Execute    190      1.35       1.42        348      52552     165435       19000
Fetch        0      0.00       0.00          0          0          0           0
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total      191      1.35       1.42        348      52552     165435       19000

Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 64     (recursive depth: 1)
Number of plan statistics captured: 1

Rows (1st) Rows (avg) Rows (max)  Row Source Operation
---------- ---------- ----------  ---------------------------------------------------
         0          0          0  UPDATE  T2 (cr=332 pr=30 pw=0 time=19223 us)
       100        100        100   INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=8 pw=0 time=1372 us cost=1 size=2015 card=1)(object id 103855)
         0          0          0  UPDATE  T2 (cr=288 pr=2 pw=0 time=8629 us)
       100        100        100   INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=0 pw=0 time=430 us cost=1 size=2015 card=1)(object id 103855)
         0          0          0  UPDATE  T2 (cr=294 pr=2 pw=0 time=8961 us)
       100        100        100   INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=0 pw=0 time=438 us cost=1 size=2015 card=1)(object id 103855)
...
         0          0          0  UPDATE  T2 (cr=294 pr=0 pw=0 time=6507 us)
       100        100        100   INDEX UNIQUE SCAN IND_T2_OBJ (cr=111 pr=0 pw=0 time=440 us cost=1 size=2015 card=1)(object id 103855)
         0          0          0  UPDATE  T2 (cr=291 pr=0 pw=0 time=6051 us)
       100        100        100   INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=0 pw=0 time=430 us cost=1 size=2015 card=1)(object id 103855)


Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  db file scattered read                         40        0.00          0.03
  db file sequential read                        32        0.00          0.01
</pre>
<p>And the output from my program:</p>
<pre>
Statement Depth 1 (Trigger Code)
Cursor 910   Ver 1   Parse at 0.187068 SQL_ID='1ahnbczb20gdx'  (TD Prev 0.000996)  Similar Cnt 1
|PARSEs       1|CPU S    0.000000|CLOCK S    0.000162|ROWs        0|PHY RD BLKs         0|CON RD BLKs (Mem)         0|CUR RD BLKs (Mem)         0|SHARED POOL MISs      1|
|EXECs      600|CPU S    3.603618|CLOCK S    3.683344|ROWs    50000|PHY RD BLKs       912|CON RD BLKs (Mem)    144826|CUR RD BLKs (Mem)    426496|SHARED POOL MISs      1|
|FETCHs       0|CPU S    0.000000|CLOCK S    0.000000|ROWs        0|PHY RD BLKs         0|CON RD BLKs (Mem)         0|CUR RD BLKs (Mem)         0|SHARED POOL MISs      0|
  CPU S 16.91%  CLOCK S 15.45%
|                 +++||                 +++|
UPDATE T2 SET PADDING1 = RPAD('y',4000,'y') WHERE OBJECT_ID = :B1

       (Rows 0)   UPDATE  T2 (cr=332 pr=30 pw=0 time=19223 us)
     (Rows 100)    INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=8 pw=0 time=1372 us cost=1 size=2015 card=1)

       (Rows 0)   UPDATE  T2 (cr=288 pr=2 pw=0 time=8629 us)
     (Rows 100)    INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=0 pw=0 time=430 us cost=1 size=2015 card=1)

       (Rows 0)   UPDATE  T2 (cr=294 pr=2 pw=0 time=8961 us)
     (Rows 100)    INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=0 pw=0 time=438 us cost=1 size=2015 card=1)
...
       (Rows 0)   UPDATE  T2 (cr=105 pr=0 pw=0 time=221 us)
       (Rows 0)    INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=0 pw=0 time=174 us cost=1 size=2015 card=1)

       (Rows 0)   UPDATE  T2 (cr=105 pr=0 pw=0 time=193 us)
       (Rows 0)    INDEX UNIQUE SCAN IND_T2_OBJ (cr=105 pr=0 pw=0 time=153 us cost=1 size=2015 card=1)
</pre>
<p>Notice now that the elapsed time is just less than half of what my program outputs, while the numbers were very close when a full table scan was the only option.  The same is true for the CPU time.  I might have to experiment a bit more to see what is happening.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2012/03/28/which-plan_hash_value-appears-in-vsqlarea/#comment-4688</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Sun, 20 May 2012 15:03:24 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6215#comment-4688</guid>
		<description><![CDATA[Mich,

Sorry for the delay in responding.

It appears that what you are seeing is a &lt;i&gt;potential&lt;/i&gt; bug in the version of tkprof that you are using, but the &lt;i&gt;potential&lt;/i&gt; bug is unconfirmed at the moment.  The version of tkprof is probably prior to 11.1.0.7.  The &lt;i&gt;potential&lt;/i&gt; bug appears to be related to attempting to subtract recursive child statistics from the associated from the parent UPDATE SQL statement statistics (the update statement has a dep=1, while the recursive child statistics will have a dep=2, great-grandchild will have a cursive dep=3, etc.).

I set up a test (60,000 rows in T1 from ALL_OBJECTS, 50,000 in T2) with Oracle Database 11.2.0.2, and the 32 bit Oracle Client 11.2.0.1 on Windows with patch 10155837 (fixes ODBC update problems related to bind variables), and found that that version of tkprof &lt;i&gt;apparently&lt;/i&gt; correctly associates the parent and child statistics (I wonder about the grandchildren statitsics).

&lt;pre&gt;
call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.00          0          0          0           0
Execute    600    197.38     197.60        452   50299237     426582       50000
Fetch        0      0.00       0.00          0          0          0           0
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total      601    197.38     197.60        452   50299237     426582       50000
 
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 64     (recursive depth: 1)
Number of plan statistics captured: 1
 
Rows (1st) Rows (avg) Rows (max)  Row Source Operation
---------- ---------- ----------  ---------------------------------------------------
         0          0          0  UPDATE  T2 (cr=80409 pr=436 pw=0 time=357525 us)
       100        100        100   TABLE ACCESS FULL T2 (cr=80182 pr=420 pw=0 time=337295 us cost=116 size=16120 card=8)
         0          0          0  UPDATE  T2 (cr=83795 pr=0 pw=0 time=344133 us)
       100        100        100   TABLE ACCESS FULL T2 (cr=83598 pr=0 pw=0 time=332180 us cost=116 size=16120 card=8)
         0          0          0  UPDATE  T2 (cr=83790 pr=2 pw=0 time=303134 us)
       100        100        100   TABLE ACCESS FULL T2 (cr=83596 pr=0 pw=0 time=288815 us cost=116 size=16120 card=8)
         0          0          0  UPDATE  T2 (cr=83789 pr=2 pw=0 time=283738 us)
       100        100        100   TABLE ACCESS FULL T2 (cr=83595 pr=0 pw=0 time=271190 us cost=116 size=16120 card=8)
...
         0          0          0  UPDATE  T2 (cr=87900 pr=0 pw=0 time=375297 us)
         0          0          0   TABLE ACCESS FULL T2 (cr=87900 pr=0 pw=0 time=375015 us cost=116 size=16120 card=8)


Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  db file sequential read                        36        0.00          0.01
  db file scattered read                         31        0.00          0.01
&lt;/pre&gt;

For comparison, my program (Hyper-Extended Oracle Performance Monitor), does not subtract child recursive statistics from the parent statistics, so double-counting of statistics is very likely when dep=1 (or greater) statements are found in the trace file.  My program output:
&lt;pre&gt;

Statement Depth 1 (Trigger Code)
Cursor 220   Ver 1   Parse at 0.254283 SQL_ID=&#039;1ahnbczb20gdx&#039;  (TD Prev 0.000877)  Similar Cnt 1
&#124;PARSEs       1&#124;CPU S    0.000000&#124;CLOCK S    0.000169&#124;ROWs        0&#124;PHY RD BLKs         0&#124;CON RD BLKs (Mem)         0&#124;CUR RD BLKs (Mem)         0&#124;SHARED POOL MISs      1&#124;
&#124;EXECs      600&#124;CPU S  197.403668&#124;CLOCK S  197.659011&#124;ROWs    50000&#124;PHY RD BLKs       774&#124;CON RD BLKs (Mem)  50299674&#124;CUR RD BLKs (Mem)    426582&#124;SHARED POOL MISs      1&#124;
&#124;FETCHs       0&#124;CPU S    0.000000&#124;CLOCK S    0.000000&#124;ROWs        0&#124;PHY RD BLKs         0&#124;CON RD BLKs (Mem)         0&#124;CUR RD BLKs (Mem)         0&#124;SHARED POOL MISs      0&#124;
  CPU S 25.08%  CLOCK S 25.01%
&#124;               +++++&#124;&#124;               +++++&#124;
UPDATE T2 SET PADDING1 = RPAD(&#039;y&#039;,4000,&#039;y&#039;) WHERE OBJECT_ID = :B1

       (Rows 0)   UPDATE  T2 (cr=80409 pr=436 pw=0 time=357525 us)
     (Rows 100)    TABLE ACCESS FULL T2 (cr=80182 pr=420 pw=0 time=337295 us cost=116 size=16120 card=8)

       (Rows 0)   UPDATE  T2 (cr=83795 pr=0 pw=0 time=344133 us)
     (Rows 100)    TABLE ACCESS FULL T2 (cr=83598 pr=0 pw=0 time=332180 us cost=116 size=16120 card=8)

       (Rows 0)   UPDATE  T2 (cr=83790 pr=2 pw=0 time=303134 us)
     (Rows 100)    TABLE ACCESS FULL T2 (cr=83596 pr=0 pw=0 time=288815 us cost=116 size=16120 card=8)

       (Rows 0)   UPDATE  T2 (cr=83789 pr=2 pw=0 time=283738 us)
     (Rows 100)    TABLE ACCESS FULL T2 (cr=83595 pr=0 pw=0 time=271190 us cost=116 size=16120 card=8)
&lt;/pre&gt;

One of the outputs of my program is also an Excel spreadsheet with the wait events for each cursor.  That spreadsheet confirms the tkprof output, that there were 31 db file scattered read waits (for a total of 416 blocks, all close to the start of the trace - Oracle was trying to fill the empty buffer cache) and 36 db file sequential read waits (36 total blocks).  Notice also that the CPU time and elapsed times differ, in addition to the number of physical blocks read and consistent gets.

Which version of Oracle11g R2 Database are you using (11.2.0.1, 11.2.0.2, 11.2.0.3)?

Which version of the Oracle client are you using?  You can determine the Oracle client by using the tnsping utility immedaitely after using tkprof:
&lt;pre&gt;
C:\Oracle\diag\rdbms\or1122p\or1122p\trace&gt;tnsping
 
TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 20-MAY-2012 11:00:31
 
Copyright (c) 1997, 2010, Oracle.  All rights reserved.
 
TNS-03502: Insufficient arguments.  Usage:  tnsping &lt;address&gt; [&lt;count&gt;]
&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>Mich,</p>
<p>Sorry for the delay in responding.</p>
<p>It appears that what you are seeing is a <i>potential</i> bug in the version of tkprof that you are using, but the <i>potential</i> bug is unconfirmed at the moment.  The version of tkprof is probably prior to 11.1.0.7.  The <i>potential</i> bug appears to be related to attempting to subtract recursive child statistics from the associated from the parent UPDATE SQL statement statistics (the update statement has a dep=1, while the recursive child statistics will have a dep=2, great-grandchild will have a cursive dep=3, etc.).</p>
<p>I set up a test (60,000 rows in T1 from ALL_OBJECTS, 50,000 in T2) with Oracle Database 11.2.0.2, and the 32 bit Oracle Client 11.2.0.1 on Windows with patch 10155837 (fixes ODBC update problems related to bind variables), and found that that version of tkprof <i>apparently</i> correctly associates the parent and child statistics (I wonder about the grandchildren statitsics).</p>
<pre>
call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        1      0.00       0.00          0          0          0           0
Execute    600    197.38     197.60        452   50299237     426582       50000
Fetch        0      0.00       0.00          0          0          0           0
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total      601    197.38     197.60        452   50299237     426582       50000
 
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 64     (recursive depth: 1)
Number of plan statistics captured: 1
 
Rows (1st) Rows (avg) Rows (max)  Row Source Operation
---------- ---------- ----------  ---------------------------------------------------
         0          0          0  UPDATE  T2 (cr=80409 pr=436 pw=0 time=357525 us)
       100        100        100   TABLE ACCESS FULL T2 (cr=80182 pr=420 pw=0 time=337295 us cost=116 size=16120 card=8)
         0          0          0  UPDATE  T2 (cr=83795 pr=0 pw=0 time=344133 us)
       100        100        100   TABLE ACCESS FULL T2 (cr=83598 pr=0 pw=0 time=332180 us cost=116 size=16120 card=8)
         0          0          0  UPDATE  T2 (cr=83790 pr=2 pw=0 time=303134 us)
       100        100        100   TABLE ACCESS FULL T2 (cr=83596 pr=0 pw=0 time=288815 us cost=116 size=16120 card=8)
         0          0          0  UPDATE  T2 (cr=83789 pr=2 pw=0 time=283738 us)
       100        100        100   TABLE ACCESS FULL T2 (cr=83595 pr=0 pw=0 time=271190 us cost=116 size=16120 card=8)
...
         0          0          0  UPDATE  T2 (cr=87900 pr=0 pw=0 time=375297 us)
         0          0          0   TABLE ACCESS FULL T2 (cr=87900 pr=0 pw=0 time=375015 us cost=116 size=16120 card=8)


Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  db file sequential read                        36        0.00          0.01
  db file scattered read                         31        0.00          0.01
</pre>
<p>For comparison, my program (Hyper-Extended Oracle Performance Monitor), does not subtract child recursive statistics from the parent statistics, so double-counting of statistics is very likely when dep=1 (or greater) statements are found in the trace file.  My program output:</p>
<pre>

Statement Depth 1 (Trigger Code)
Cursor 220   Ver 1   Parse at 0.254283 SQL_ID='1ahnbczb20gdx'  (TD Prev 0.000877)  Similar Cnt 1
|PARSEs       1|CPU S    0.000000|CLOCK S    0.000169|ROWs        0|PHY RD BLKs         0|CON RD BLKs (Mem)         0|CUR RD BLKs (Mem)         0|SHARED POOL MISs      1|
|EXECs      600|CPU S  197.403668|CLOCK S  197.659011|ROWs    50000|PHY RD BLKs       774|CON RD BLKs (Mem)  50299674|CUR RD BLKs (Mem)    426582|SHARED POOL MISs      1|
|FETCHs       0|CPU S    0.000000|CLOCK S    0.000000|ROWs        0|PHY RD BLKs         0|CON RD BLKs (Mem)         0|CUR RD BLKs (Mem)         0|SHARED POOL MISs      0|
  CPU S 25.08%  CLOCK S 25.01%
|               +++++||               +++++|
UPDATE T2 SET PADDING1 = RPAD('y',4000,'y') WHERE OBJECT_ID = :B1

       (Rows 0)   UPDATE  T2 (cr=80409 pr=436 pw=0 time=357525 us)
     (Rows 100)    TABLE ACCESS FULL T2 (cr=80182 pr=420 pw=0 time=337295 us cost=116 size=16120 card=8)

       (Rows 0)   UPDATE  T2 (cr=83795 pr=0 pw=0 time=344133 us)
     (Rows 100)    TABLE ACCESS FULL T2 (cr=83598 pr=0 pw=0 time=332180 us cost=116 size=16120 card=8)

       (Rows 0)   UPDATE  T2 (cr=83790 pr=2 pw=0 time=303134 us)
     (Rows 100)    TABLE ACCESS FULL T2 (cr=83596 pr=0 pw=0 time=288815 us cost=116 size=16120 card=8)

       (Rows 0)   UPDATE  T2 (cr=83789 pr=2 pw=0 time=283738 us)
     (Rows 100)    TABLE ACCESS FULL T2 (cr=83595 pr=0 pw=0 time=271190 us cost=116 size=16120 card=8)
</pre>
<p>One of the outputs of my program is also an Excel spreadsheet with the wait events for each cursor.  That spreadsheet confirms the tkprof output, that there were 31 db file scattered read waits (for a total of 416 blocks, all close to the start of the trace &#8211; Oracle was trying to fill the empty buffer cache) and 36 db file sequential read waits (36 total blocks).  Notice also that the CPU time and elapsed times differ, in addition to the number of physical blocks read and consistent gets.</p>
<p>Which version of Oracle11g R2 Database are you using (11.2.0.1, 11.2.0.2, 11.2.0.3)?</p>
<p>Which version of the Oracle client are you using?  You can determine the Oracle client by using the tnsping utility immedaitely after using tkprof:</p>
<pre>
C:\Oracle\diag\rdbms\or1122p\or1122p\trace&gt;tnsping
 
TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 20-MAY-2012 11:00:31
 
Copyright (c) 1997, 2010, Oracle.  All rights reserved.
 
TNS-03502: Insufficient arguments.  Usage:  tnsping &lt;address&gt; [&lt;count&gt;]
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mich Talebzadeh</title>
		<link>http://hoopercharles.wordpress.com/2012/03/28/which-plan_hash_value-appears-in-vsqlarea/#comment-4687</link>
		<dc:creator><![CDATA[Mich Talebzadeh]]></dc:creator>
		<pubDate>Fri, 18 May 2012 21:35:20 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6215#comment-4687</guid>
		<description><![CDATA[Hi just a correction

db file sequential reads are single block IO&#039;s.  they are not 32 they are 1. db file scattered reads are the multi-block IO&#039;s, they range from 2-7 blocks

Could this be exlained due to recursive sql]]></description>
		<content:encoded><![CDATA[<p>Hi just a correction</p>
<p>db file sequential reads are single block IO&#8217;s.  they are not 32 they are 1. db file scattered reads are the multi-block IO&#8217;s, they range from 2-7 blocks</p>
<p>Could this be exlained due to recursive sql</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mich Talebzadeh</title>
		<link>http://hoopercharles.wordpress.com/2012/03/28/which-plan_hash_value-appears-in-vsqlarea/#comment-4686</link>
		<dc:creator><![CDATA[Mich Talebzadeh]]></dc:creator>
		<pubDate>Fri, 18 May 2012 20:57:13 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6215#comment-4686</guid>
		<description><![CDATA[Thanks Charles.

Briefly:

This is Oracle11g R2 on 8K block

I am running the following simple OLTP type tests. Selecting 1.7 million rows into an associateive array and updating another table where object_id match (via index key)

Table tdash has 1.7 Million rows based on all_objects + padding1 varchar(4000) + padding2 varchar(4000). There is a unique index on object_id
Table testwrites was created as CREATE TABLE testwrites AS SELECT * FROM tdash WHERE ROWNUM &lt;=1000000. A unque index was created on object_id of testwrites table.

The Pl/SQL block
&lt;pre&gt;
EXEC DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=&gt;true, plan_stat=&gt;&#039;ALL_EXECUTIONS&#039; );
DECLARE
        type ObjIdArray is table of tdash.object_id%TYPE index by binary_integer;
        l_ids objIdArray;
        CURSOR c IS SELECT object_id FROM tdash;
BEGIN
        OPEN c;
        LOOP
                BEGIN
                        FETCH c BULK COLLECT INTO l_ids LIMIT 100;

                        FORALL rs in 1 .. l_ids.COUNT
                                UPDATE testwrites
                                  SET PADDING1 =  RPAD(&#039;y&#039;,4000,&#039;y&#039;)
                                WHERE object_id = l_ids(rs);
                        commit;
                        FORALL rs in 1 .. l_ids.COUNT
                                DELETE FROM testwrites
                                WHERE object_id = l_ids(rs);
                        commit;
                        FORALL rs in 1 .. l_ids.COUNT
                                INSERT INTO testwrites
                                SELECT * FROM tdash t WHERE t.object_id = l_ids(rs);
                        commit;
                        EXIT WHEN C%NOTFOUND;
                EXCEPTION
                  WHEN NO_DATA_FOUND THEN
                    NULL;
                  WHEN OTHERS THEN
                    DBMS_OUTPUT.PUT_LINE(&#039;Transaction failed&#039;);
                END;
        END LOOP;
        CLOSE c;
END;
&lt;/pre&gt;
TKPROF output for update only shows:
&lt;pre&gt;
UPDATE TESTWRITES SET PADDING1 = RPAD(&#039;y&#039;,4000,&#039;y&#039;)
WHERE
OBJECT_ID = :B1
 
 
call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        4      0.00       0.00          0          0          0           0
Execute  17293     21.62    1245.41    1064667    2411398    6280588     1000000
Fetch        0      0.00       0.00          0          0          0           0
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total    17297     21.62    1245.41    1064667    2411398    6280588     1000000
 
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 93     (recursive depth: 1)
 
Rows     Row Source Operation
-------  ---------------------------------------------------
      0  UPDATE  TESTWRITES (cr=214 pr=427 pw=0 time=0 us)
    100   INDEX UNIQUE SCAN TESTWRITES_PK (cr=110 pr=3 pw=0 time=0 us cost=2 size=4007 card=1)(object id 92380)
 
 
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  Disk file operations I/O                        2        0.00          0.00
  db file sequential read                   2160263        1.57       2304.22
  db file scattered read                      27769        0.26         99.78
  
*******************************************************************************
 
SQL ID: 8ggw94h7mvxd7
Plan Hash: 0
COMMIT
 
 
call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse    51879      0.16       0.35          0          0          0           0
Execute  51879      1.82       6.29          0          0      37301           0
Fetch        0      0.00       0.00          0          0          0           0
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total   103758      1.98       6.65          0          0      37301           0
 
Misses in library cache during parse: 0
Parsing user id: 93     (recursive depth: 1)
 
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  log file switch completion                      1        0.05          0.05
  db file sequential read                    121686        1.39        162.95
  log buffer space                                2        0.98          0.99
  log file switch (private strand flush incomplete)
                                                  1        1.47          1.47
********************************************************************************
&lt;/pre&gt;
Now why my elapsed times for updates from wait events 2304.22+ 99.78 = 2404 sec is HIGHER than my elapsed time of 1245.21 sec? I don&#039;t think it can be explained purely due to different clock granularities. Additionally,  

Also  I have &quot;db file sequential read&quot; = 2,160,263  physical IOs and from the rsaw trace file one physical IO in this case is 32 blocks. I also have &quot;db file scattered read&quot; = 27,769 physical IOs. In contrast the number of my disk reads is 1,064,667 blocks which is far less that sum of physical IOs. Something is not right somewhere.

Thanks,

Mich]]></description>
		<content:encoded><![CDATA[<p>Thanks Charles.</p>
<p>Briefly:</p>
<p>This is Oracle11g R2 on 8K block</p>
<p>I am running the following simple OLTP type tests. Selecting 1.7 million rows into an associateive array and updating another table where object_id match (via index key)</p>
<p>Table tdash has 1.7 Million rows based on all_objects + padding1 varchar(4000) + padding2 varchar(4000). There is a unique index on object_id<br />
Table testwrites was created as CREATE TABLE testwrites AS SELECT * FROM tdash WHERE ROWNUM &lt;=1000000. A unque index was created on object_id of testwrites table.</p>
<p>The Pl/SQL block</p>
<pre>
EXEC DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=&gt;true, plan_stat=&gt;'ALL_EXECUTIONS' );
DECLARE
        type ObjIdArray is table of tdash.object_id%TYPE index by binary_integer;
        l_ids objIdArray;
        CURSOR c IS SELECT object_id FROM tdash;
BEGIN
        OPEN c;
        LOOP
                BEGIN
                        FETCH c BULK COLLECT INTO l_ids LIMIT 100;

                        FORALL rs in 1 .. l_ids.COUNT
                                UPDATE testwrites
                                  SET PADDING1 =  RPAD('y',4000,'y')
                                WHERE object_id = l_ids(rs);
                        commit;
                        FORALL rs in 1 .. l_ids.COUNT
                                DELETE FROM testwrites
                                WHERE object_id = l_ids(rs);
                        commit;
                        FORALL rs in 1 .. l_ids.COUNT
                                INSERT INTO testwrites
                                SELECT * FROM tdash t WHERE t.object_id = l_ids(rs);
                        commit;
                        EXIT WHEN C%NOTFOUND;
                EXCEPTION
                  WHEN NO_DATA_FOUND THEN
                    NULL;
                  WHEN OTHERS THEN
                    DBMS_OUTPUT.PUT_LINE('Transaction failed');
                END;
        END LOOP;
        CLOSE c;
END;
</pre>
<p>TKPROF output for update only shows:</p>
<pre>
UPDATE TESTWRITES SET PADDING1 = RPAD('y',4000,'y')
WHERE
OBJECT_ID = :B1
 
 
call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse        4      0.00       0.00          0          0          0           0
Execute  17293     21.62    1245.41    1064667    2411398    6280588     1000000
Fetch        0      0.00       0.00          0          0          0           0
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total    17297     21.62    1245.41    1064667    2411398    6280588     1000000
 
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 93     (recursive depth: 1)
 
Rows     Row Source Operation
-------  ---------------------------------------------------
      0  UPDATE  TESTWRITES (cr=214 pr=427 pw=0 time=0 us)
    100   INDEX UNIQUE SCAN TESTWRITES_PK (cr=110 pr=3 pw=0 time=0 us cost=2 size=4007 card=1)(object id 92380)
 
 
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  Disk file operations I/O                        2        0.00          0.00
  db file sequential read                   2160263        1.57       2304.22
  db file scattered read                      27769        0.26         99.78
  
*******************************************************************************
 
SQL ID: 8ggw94h7mvxd7
Plan Hash: 0
COMMIT
 
 
call     count       cpu    elapsed       disk      query    current        rows
------- ------  -------- ---------- ---------- ---------- ----------  ----------
Parse    51879      0.16       0.35          0          0          0           0
Execute  51879      1.82       6.29          0          0      37301           0
Fetch        0      0.00       0.00          0          0          0           0
------- ------  -------- ---------- ---------- ---------- ----------  ----------
total   103758      1.98       6.65          0          0      37301           0
 
Misses in library cache during parse: 0
Parsing user id: 93     (recursive depth: 1)
 
Elapsed times include waiting on following events:
  Event waited on                             Times   Max. Wait  Total Waited
  ----------------------------------------   Waited  ----------  ------------
  log file switch completion                      1        0.05          0.05
  db file sequential read                    121686        1.39        162.95
  log buffer space                                2        0.98          0.99
  log file switch (private strand flush incomplete)
                                                  1        1.47          1.47
********************************************************************************
</pre>
<p>Now why my elapsed times for updates from wait events 2304.22+ 99.78 = 2404 sec is HIGHER than my elapsed time of 1245.21 sec? I don&#8217;t think it can be explained purely due to different clock granularities. Additionally,  </p>
<p>Also  I have &#8220;db file sequential read&#8221; = 2,160,263  physical IOs and from the rsaw trace file one physical IO in this case is 32 blocks. I also have &#8220;db file scattered read&#8221; = 27,769 physical IOs. In contrast the number of my disk reads is 1,064,667 blocks which is far less that sum of physical IOs. Something is not right somewhere.</p>
<p>Thanks,</p>
<p>Mich</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2012/03/28/which-plan_hash_value-appears-in-vsqlarea/#comment-4685</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Fri, 18 May 2012 15:18:31 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6215#comment-4685</guid>
		<description><![CDATA[MIch,

I have been struggling to find time lately to write anything on this blog (I am suffering a bit from lack of ideas), or even to look through message threads on OTN or read blogs.

That is an interesting problem that you mention.  If you look in the raw trace file, do you see any waits associated with CURSOR #0?  Another thought is that SQL statements at recursive dep=1 or dep=2 might be affecting the tkprof output.

I will hopefully have some time later today - it might make for an interesting blog article to explore an example of the wait time being greater than the elapsed time.  How large is the trace file?]]></description>
		<content:encoded><![CDATA[<p>MIch,</p>
<p>I have been struggling to find time lately to write anything on this blog (I am suffering a bit from lack of ideas), or even to look through message threads on OTN or read blogs.</p>
<p>That is an interesting problem that you mention.  If you look in the raw trace file, do you see any waits associated with CURSOR #0?  Another thought is that SQL statements at recursive dep=1 or dep=2 might be affecting the tkprof output.</p>
<p>I will hopefully have some time later today &#8211; it might make for an interesting blog article to explore an example of the wait time being greater than the elapsed time.  How large is the trace file?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mich Talebzadeh</title>
		<link>http://hoopercharles.wordpress.com/2012/03/28/which-plan_hash_value-appears-in-vsqlarea/#comment-4684</link>
		<dc:creator><![CDATA[Mich Talebzadeh]]></dc:creator>
		<pubDate>Fri, 18 May 2012 13:19:36 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6215#comment-4684</guid>
		<description><![CDATA[Hi Charles,

I have an output from tkprof that Elapsed time from wait events is higher than &quot;elapsed&quot; in tkprof output. However, I do not know where in your blog I can post it. So aplogies for this. A comment has been it is due to using different clock granularities. Please advise if you are interested in me posting and where.

Thanks,

Mich]]></description>
		<content:encoded><![CDATA[<p>Hi Charles,</p>
<p>I have an output from tkprof that Elapsed time from wait events is higher than &#8220;elapsed&#8221; in tkprof output. However, I do not know where in your blog I can post it. So aplogies for this. A comment has been it is due to using different clock granularities. Please advise if you are interested in me posting and where.</p>
<p>Thanks,</p>
<p>Mich</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Log Buffer #265, A Carnival of the Vanities for DBAs &#124; The Pythian Blog</title>
		<link>http://hoopercharles.wordpress.com/2012/03/28/which-plan_hash_value-appears-in-vsqlarea/#comment-4595</link>
		<dc:creator><![CDATA[Log Buffer #265, A Carnival of the Vanities for DBAs &#124; The Pythian Blog]]></dc:creator>
		<pubDate>Fri, 30 Mar 2012 06:01:24 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6215#comment-4595</guid>
		<description><![CDATA[[...] PLAN_HASH_VALUE Appears in V$SQLAREA? Charles Hooper [...]]]></description>
		<content:encoded><![CDATA[<p>[...] PLAN_HASH_VALUE Appears in V$SQLAREA? Charles Hooper [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
