<?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: Consistent Gets</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2009/05/14/consistent-gets/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2009/05/14/consistent-gets/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Wed, 19 Jun 2013 16:07:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Timur Akhmadeev</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/14/consistent-gets/#comment-33417</link>
		<dc:creator><![CDATA[Timur Akhmadeev]]></dc:creator>
		<pubDate>Fri, 12 Jun 2009 17:49:53 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=1245#comment-33417</guid>
		<description><![CDATA[My intention was to say &quot;it is executing (right now). it isn&#039;t finished (yet)&quot;. Sorry for confusing you.]]></description>
		<content:encoded><![CDATA[<p>My intention was to say &#8220;it is executing (right now). it isn&#8217;t finished (yet)&#8221;. Sorry for confusing you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/14/consistent-gets/#comment-33401</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 11 Jun 2009 21:28:37 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=1245#comment-33401</guid>
		<description><![CDATA[Timur,

Now I&#039;m very confused - in your follow-up post, after I asked &quot;are you saying this statement executes just once&quot; you replied &quot;this query was not executed just once, it has been executing for ...&quot;

It sounds like we&#039;re back to something unusual - so I&#039;d be looking at the stats that I listed in my earlier reply.]]></description>
		<content:encoded><![CDATA[<p>Timur,</p>
<p>Now I&#8217;m very confused &#8211; in your follow-up post, after I asked &#8220;are you saying this statement executes just once&#8221; you replied &#8220;this query was not executed just once, it has been executing for &#8230;&#8221;</p>
<p>It sounds like we&#8217;re back to something unusual &#8211; so I&#8217;d be looking at the stats that I listed in my earlier reply.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timur Akhmadeev</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/14/consistent-gets/#comment-33399</link>
		<dc:creator><![CDATA[Timur Akhmadeev]]></dc:creator>
		<pubDate>Thu, 11 Jun 2009 19:51:12 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=1245#comment-33399</guid>
		<description><![CDATA[Jonathan, I&#039;m sorry if I my description was obscure.
&gt;What you said sounded like “a single update that should be for a single row accessed by primary key has done a huge amount of work”.
That is in short what I wanted to say.

&gt;What you meant was “why has this update statement executed 6 million times in the last 4 hours”.
Could you please point me to my words which lead to this conclusion? So if it&#039;s my inconsistency I wouldn&#039;t repeat it next time.]]></description>
		<content:encoded><![CDATA[<p>Jonathan, I&#8217;m sorry if I my description was obscure.<br />
&gt;What you said sounded like “a single update that should be for a single row accessed by primary key has done a huge amount of work”.<br />
That is in short what I wanted to say.</p>
<p>&gt;What you meant was “why has this update statement executed 6 million times in the last 4 hours”.<br />
Could you please point me to my words which lead to this conclusion? So if it&#8217;s my inconsistency I wouldn&#8217;t repeat it next time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/14/consistent-gets/#comment-33396</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 11 Jun 2009 18:28:06 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=1245#comment-33396</guid>
		<description><![CDATA[Timur,

You should always take great care to ensure that you&#039;ve presented the significant facts when describing a problem.

What you said sounded like &quot;a single update that should be for a single row accessed by primary key has done a huge amount of work&quot;.  

What you meant was &quot;why has this update statement executed 6 million times in the last 4 hours&quot;.]]></description>
		<content:encoded><![CDATA[<p>Timur,</p>
<p>You should always take great care to ensure that you&#8217;ve presented the significant facts when describing a problem.</p>
<p>What you said sounded like &#8220;a single update that should be for a single row accessed by primary key has done a huge amount of work&#8221;.  </p>
<p>What you meant was &#8220;why has this update statement executed 6 million times in the last 4 hours&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timur Akhmadeev</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/14/consistent-gets/#comment-33395</link>
		<dc:creator><![CDATA[Timur Akhmadeev]]></dc:creator>
		<pubDate>Thu, 11 Jun 2009 17:37:02 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=1245#comment-33395</guid>
		<description><![CDATA[Jonathan,

thank you for feedback.
This query was not executed just once, it has been executing for more than 10 hours already on a customer&#039;s test non-RAC 10.2.0.4 @ Solaris 10 environment :) The query is
&lt;pre&gt;
update sys.snap$ set status = :1 where vname = :3 and sowner = :2 and instsite = :4
&lt;/pre&gt;
so, no CLOBs to update. A query is reported as currently being executed by an active session of a job, and it&#039;s plan in v$sql_plan is update by UQ index. Maybe v$sql.sql_id reports wrong info - that&#039;s possible.
Thanks again for your suggestions.]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>thank you for feedback.<br />
This query was not executed just once, it has been executing for more than 10 hours already on a customer&#8217;s test non-RAC 10.2.0.4 @ Solaris 10 environment :) The query is</p>
<pre>
update sys.snap$ set status = :1 where vname = :3 and sowner = :2 and instsite = :4
</pre>
<p>so, no CLOBs to update. A query is reported as currently being executed by an active session of a job, and it&#8217;s plan in v$sql_plan is update by UQ index. Maybe v$sql.sql_id reports wrong info &#8211; that&#8217;s possible.<br />
Thanks again for your suggestions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/14/consistent-gets/#comment-33391</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 11 Jun 2009 16:40:07 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=1245#comment-33391</guid>
		<description><![CDATA[Timur,

Are you saying that this update statement executes just once to update one row by unique key ?  (There is no PK on sys.snaps$, by the way, just one unique key).

First I&#039;d look in v$session to check if this really was the executing statement
Then I&#039;d check in v$sql_plan (dbms_xplan.display_cursor) to check that the execution plan was as stated
Then I&#039;d check in v$sql to see that it was executed just once
Then take a &lt;a href=&quot;http://www.jlcomp.demon.co.uk/buffer_usage.html&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;&lt;strong&gt;snapshot of x$kcbsw&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt; to see what type of logical I/O was being done, at the same time taking a snapshot of &lt;em&gt;&lt;strong&gt;v$sesstat&lt;/strong&gt;&lt;/em&gt; for that session to see if the two agreed.  (And check if the figures from &lt;em&gt;&lt;strong&gt;v$sesstat&lt;/strong&gt;&lt;/em&gt; agree with the log_io from &lt;em&gt;&lt;strong&gt;v$transaction&lt;/strong&gt;&lt;/em&gt; - I&#039;ve got one example where &lt;em&gt;&lt;strong&gt;v$transaction&lt;/strong&gt;&lt;/em&gt; over-reports).
Then I&#039;d sit back and think for a bit.

sys.snap$ has a long column and two clob columns - so who know how nasty a single row update could get ;) (especially if your system tablespace is using ASSM and your block size is bigger than 8KB).]]></description>
		<content:encoded><![CDATA[<p>Timur,</p>
<p>Are you saying that this update statement executes just once to update one row by unique key ?  (There is no PK on sys.snaps$, by the way, just one unique key).</p>
<p>First I&#8217;d look in v$session to check if this really was the executing statement<br />
Then I&#8217;d check in v$sql_plan (dbms_xplan.display_cursor) to check that the execution plan was as stated<br />
Then I&#8217;d check in v$sql to see that it was executed just once<br />
Then take a <a href="http://www.jlcomp.demon.co.uk/buffer_usage.html" rel="nofollow"><em><strong>snapshot of x$kcbsw</strong></em></a> to see what type of logical I/O was being done, at the same time taking a snapshot of <em><strong>v$sesstat</strong></em> for that session to see if the two agreed.  (And check if the figures from <em><strong>v$sesstat</strong></em> agree with the log_io from <em><strong>v$transaction</strong></em> &#8211; I&#8217;ve got one example where <em><strong>v$transaction</strong></em> over-reports).<br />
Then I&#8217;d sit back and think for a bit.</p>
<p>sys.snap$ has a long column and two clob columns &#8211; so who know how nasty a single row update could get ;) (especially if your system tablespace is using ASSM and your block size is bigger than 8KB).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timur Akhmadeev</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/14/consistent-gets/#comment-33381</link>
		<dc:creator><![CDATA[Timur Akhmadeev]]></dc:creator>
		<pubDate>Thu, 11 Jun 2009 10:56:18 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=1245#comment-33381</guid>
		<description><![CDATA[Jonathan,

what would you say in case of

1) one query, UPDATE by single PK value, is executing for more than 4 hours
2) no TX contention
3) most significant wait event is &#039;db file sequential read&#039; (more than 4 hours, ~1M total occurences in session)
4) V$TRANSACTION.LOG_IO is increasing permanently and fast (more than 20M currently)
5) V$TRANSACTION.CR_CHANGE is slightly increasing (~5K currently)
6) probably some other activities were done in this transaction, but their contribution in terms of elapsed time and used resources may be neglected
7)
&lt;pre&gt;
SQL&gt; select max(undoblks) from v$undostat;
 
MAX(UNDOBLKS)
-------------
         4774
&lt;/pre&gt;
8) no other active transactions are taking place
9) UPDATE operates on data dictionary table SYS.SNAP$

?

TIA.]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>what would you say in case of</p>
<p>1) one query, UPDATE by single PK value, is executing for more than 4 hours<br />
2) no TX contention<br />
3) most significant wait event is &#8216;db file sequential read&#8217; (more than 4 hours, ~1M total occurences in session)<br />
4) V$TRANSACTION.LOG_IO is increasing permanently and fast (more than 20M currently)<br />
5) V$TRANSACTION.CR_CHANGE is slightly increasing (~5K currently)<br />
6) probably some other activities were done in this transaction, but their contribution in terms of elapsed time and used resources may be neglected<br />
7)</p>
<pre>
SQL&gt; select max(undoblks) from v$undostat;
 
MAX(UNDOBLKS)
-------------
         4774
</pre>
<p>8) no other active transactions are taking place<br />
9) UPDATE operates on data dictionary table SYS.SNAP$</p>
<p>?</p>
<p>TIA.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/14/consistent-gets/#comment-33121</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Fri, 22 May 2009 19:57:17 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=1245#comment-33121</guid>
		<description><![CDATA[When I wrote this note the thread had only just started - and I had assumed that it was going to be another case of the run-time plan being different from the &quot;explain plan&quot; version.

It turned out that the possibility I had suggested in this note really was happening to the OP, so if you haven&#039;t reviewed the OTN thread since my first comments you might want to take another look at how it developed.]]></description>
		<content:encoded><![CDATA[<p>When I wrote this note the thread had only just started &#8211; and I had assumed that it was going to be another case of the run-time plan being different from the &#8220;explain plan&#8221; version.</p>
<p>It turned out that the possibility I had suggested in this note really was happening to the OP, so if you haven&#8217;t reviewed the OTN thread since my first comments you might want to take another look at how it developed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/14/consistent-gets/#comment-32997</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 14 May 2009 09:41:37 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=1245#comment-32997</guid>
		<description><![CDATA[Timur,

Thanks, now fixed. It was the usual &quot;less than&quot; problem.]]></description>
		<content:encoded><![CDATA[<p>Timur,</p>
<p>Thanks, now fixed. It was the usual &#8220;less than&#8221; problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timur Akhmadeev</title>
		<link>http://jonathanlewis.wordpress.com/2009/05/14/consistent-gets/#comment-32996</link>
		<dc:creator><![CDATA[Timur Akhmadeev]]></dc:creator>
		<pubDate>Thu, 14 May 2009 09:15:51 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=1245#comment-32996</guid>
		<description><![CDATA[Jonathan, there&#039;s no magic, I saw your response in the OTN thread with a link to the blog post :)
PS. There&#039;s small mistake in a test case - some lines are missing.]]></description>
		<content:encoded><![CDATA[<p>Jonathan, there&#8217;s no magic, I saw your response in the OTN thread with a link to the blog post :)<br />
PS. There&#8217;s small mistake in a test case &#8211; some lines are missing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
