<?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: Redo</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2011/01/03/redo/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2011/01/03/redo/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Wed, 22 May 2013 12:40:08 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2011/01/03/redo/#comment-49146</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sun, 19 Aug 2012 16:34:14 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5407#comment-49146</guid>
		<description><![CDATA[Haibin Sun,

There is a reference to this on page 16 of Oracle Core. The v$bh structure has a bitmap for various flags, including a bit for &quot;has private redo&quot;. If a session was to view a block that is flagged with private redo it forces the owning session to flush all its in-memory undo and private redo into public memory - which includes the steps to modify the buffered block.  I think this event is recorded in x$ktiff under statistic &quot;Contention flushes&quot;.]]></description>
		<content:encoded><![CDATA[<p>Haibin Sun,</p>
<p>There is a reference to this on page 16 of Oracle Core. The v$bh structure has a bitmap for various flags, including a bit for &#8220;has private redo&#8221;. If a session was to view a block that is flagged with private redo it forces the owning session to flush all its in-memory undo and private redo into public memory &#8211; which includes the steps to modify the buffered block.  I think this event is recorded in x$ktiff under statistic &#8220;Contention flushes&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Haibin Sun</title>
		<link>http://jonathanlewis.wordpress.com/2011/01/03/redo/#comment-49069</link>
		<dc:creator><![CDATA[Haibin Sun]]></dc:creator>
		<pubDate>Wed, 15 Aug 2012 18:28:48 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5407#comment-49069</guid>
		<description><![CDATA[Jonathan,

10g doesn’t apply any changes to data blocks until the commit (for “short” transactions), 

I have a question about this. How do other sessions know the changes made by uncommitted transactions when they do &quot;db block get&quot;, that is, how to guarantee the CUR block includes latest changes? This question puzzled me for a while. 

Thanks]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>10g doesn’t apply any changes to data blocks until the commit (for “short” transactions), </p>
<p>I have a question about this. How do other sessions know the changes made by uncommitted transactions when they do &#8220;db block get&#8221;, that is, how to guarantee the CUR block includes latest changes? This question puzzled me for a while. </p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2011/01/03/redo/#comment-43705</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Wed, 28 Dec 2011 20:10:24 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5407#comment-43705</guid>
		<description><![CDATA[It is sufficient to use the command:
[sourcecode]
alter system dump datafile X block Y;
[/sourcecode]

For further reading on this topic, you can always see chapter 2 and the appendix of &lt;em&gt;&lt;strong&gt;&lt;a href=&quot;http://jonathanlewis.wordpress.com/oracle-core/&quot; rel=&quot;nofollow&quot;&gt;Oracle Core&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt;.]]></description>
		<content:encoded><![CDATA[<p>It is sufficient to use the command:</p>
<pre class="brush: plain; title: ; notranslate">
alter system dump datafile X block Y;
</pre>
<p>For further reading on this topic, you can always see chapter 2 and the appendix of <em><strong><a href="http://jonathanlewis.wordpress.com/oracle-core/" rel="nofollow">Oracle Core</a></strong></em>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DBA 蜗牛</title>
		<link>http://jonathanlewis.wordpress.com/2011/01/03/redo/#comment-43638</link>
		<dc:creator><![CDATA[DBA 蜗牛]]></dc:creator>
		<pubDate>Tue, 27 Dec 2011 05:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5407#comment-43638</guid>
		<description><![CDATA[hi,sir
how to prove the data block and the undo block is updated  when the session commit ? DUMP BUFFER?]]></description>
		<content:encoded><![CDATA[<p>hi,sir<br />
how to prove the data block and the undo block is updated  when the session commit ? DUMP BUFFER?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2011/01/03/redo/#comment-40824</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Tue, 21 Jun 2011 05:49:32 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5407#comment-40824</guid>
		<description><![CDATA[Tony,
I think it&#039;s more of a &quot;common oversight&quot; than a myth or mythunderstanding.
The manuals (and all the books that copied them) used to say something about needing very little undo to reverse an insert because you only had to mark the table entry as non-existent: however the focus was alway on the table, and never made any comment about the indexes - so I don&#039;t think the average DBA thought about the effects on indexes.

The same sort of oversight happens with the redo and undo, People don&#039;t think about the cost of maintaining the indexes. How many times do you see complaints on OTN from people saying:  &quot;My batch job inserts 1,000,000 rows into a table - why is it taking 3 hours and doing 3.5M physical reads?&quot;

There&#039;s probably a very good reason for all those &quot;extra&quot; bytes. One day I may look at them more closely.]]></description>
		<content:encoded><![CDATA[<p>Tony,<br />
I think it&#8217;s more of a &#8220;common oversight&#8221; than a myth or mythunderstanding.<br />
The manuals (and all the books that copied them) used to say something about needing very little undo to reverse an insert because you only had to mark the table entry as non-existent: however the focus was alway on the table, and never made any comment about the indexes &#8211; so I don&#8217;t think the average DBA thought about the effects on indexes.</p>
<p>The same sort of oversight happens with the redo and undo, People don&#8217;t think about the cost of maintaining the indexes. How many times do you see complaints on OTN from people saying:  &#8220;My batch job inserts 1,000,000 rows into a table &#8211; why is it taking 3 hours and doing 3.5M physical reads?&#8221;</p>
<p>There&#8217;s probably a very good reason for all those &#8220;extra&#8221; bytes. One day I may look at them more closely.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tonyhasler</title>
		<link>http://jonathanlewis.wordpress.com/2011/01/03/redo/#comment-40820</link>
		<dc:creator><![CDATA[tonyhasler]]></dc:creator>
		<pubDate>Mon, 20 Jun 2011 22:49:54 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5407#comment-40820</guid>
		<description><![CDATA[Thanks Jonathan.  Another &quot;myth busted&quot; (or at least a personal misunderstanding corrected :-))

My second question was not specific to undo and more of an observation than a question:  it just seems amazing that to insert two tiny rows with two tiny indexes you generate 1592 bytes of redo.  On the other hand, it would seem appropriate to focus the redo design on keeping redo generation and recovery simple and efficient rather than optimising space usage on a circular file.  So perhaps I shouldn&#039;t be that surprised.]]></description>
		<content:encoded><![CDATA[<p>Thanks Jonathan.  Another &#8220;myth busted&#8221; (or at least a personal misunderstanding corrected :-))</p>
<p>My second question was not specific to undo and more of an observation than a question:  it just seems amazing that to insert two tiny rows with two tiny indexes you generate 1592 bytes of redo.  On the other hand, it would seem appropriate to focus the redo design on keeping redo generation and recovery simple and efficient rather than optimising space usage on a circular file.  So perhaps I shouldn&#8217;t be that surprised.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2011/01/03/redo/#comment-40816</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Mon, 20 Jun 2011 20:14:13 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5407#comment-40816</guid>
		<description><![CDATA[Tony,
A table row has an absolute location - its rowid which is the object id, file id, block id, row number in the row directory; so when you insert a row the undo operation need only be: &quot;unlink&quot; the row directory. 

An index entry doesn&#039;t have an absolute location - the row directory is adjusted as each entry is inserted and deleted, and leaf blocks can split, moving index entries to a completely different block; so when you insert an index entry the only way you can be sure of finding it to undo the entry is to store the key value. (This also means that when you undo an index insert you have to walk through the root and branch blocks before you can get to the correct leaf block - which makes index undo application more expensive than table undo application.)

I&#039;ve never felt the urge to try and track down the function of every single byte in an undo change vector, so I can&#039;t tell you what all the overheads are for.  I&#039;ve just picked out the important bits when I&#039;ve needed to solve particular problems.
]]></description>
		<content:encoded><![CDATA[<p>Tony,<br />
A table row has an absolute location &#8211; its rowid which is the object id, file id, block id, row number in the row directory; so when you insert a row the undo operation need only be: &#8220;unlink&#8221; the row directory. </p>
<p>An index entry doesn&#8217;t have an absolute location &#8211; the row directory is adjusted as each entry is inserted and deleted, and leaf blocks can split, moving index entries to a completely different block; so when you insert an index entry the only way you can be sure of finding it to undo the entry is to store the key value. (This also means that when you undo an index insert you have to walk through the root and branch blocks before you can get to the correct leaf block &#8211; which makes index undo application more expensive than table undo application.)</p>
<p>I&#8217;ve never felt the urge to try and track down the function of every single byte in an undo change vector, so I can&#8217;t tell you what all the overheads are for.  I&#8217;ve just picked out the important bits when I&#8217;ve needed to solve particular problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tonyhasler</title>
		<link>http://jonathanlewis.wordpress.com/2011/01/03/redo/#comment-40813</link>
		<dc:creator><![CDATA[tonyhasler]]></dc:creator>
		<pubDate>Mon, 20 Jun 2011 17:48:00 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5407#comment-40813</guid>
		<description><![CDATA[Jonathan,

A couple of general questions about undo.  Firstly, I am intrigued that the undo change vectors for index entries seem to include the column data (e.g. line 130 in 10g example above).  This seems to contradict my previous understanding that undo for inserts would be minimal.  Indeed, for a large IOT this might be onerous.  I can&#039;t see why this data is needed, can you?

The second question relates to the total size of the redo data.  In the 10g example above, the length of the redo record is given on line 0 as 0x0638. 1592 bytes seems a lot of overhead; it is an average of over 100 bytes per change vector.  I can&#039;t work out where it is all going.  Can you explain please?]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>A couple of general questions about undo.  Firstly, I am intrigued that the undo change vectors for index entries seem to include the column data (e.g. line 130 in 10g example above).  This seems to contradict my previous understanding that undo for inserts would be minimal.  Indeed, for a large IOT this might be onerous.  I can&#8217;t see why this data is needed, can you?</p>
<p>The second question relates to the total size of the redo data.  In the 10g example above, the length of the redo record is given on line 0 as 0&#215;0638. 1592 bytes seems a lot of overhead; it is an average of over 100 bytes per change vector.  I can&#8217;t work out where it is all going.  Can you explain please?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2011/01/03/redo/#comment-40603</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 02 Jun 2011 20:30:28 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5407#comment-40603</guid>
		<description><![CDATA[Nilesh,

Every block change is described in the redo - even the changes which are the changes to the undo blocks.
On recovery (instance or media) every redo change vector that needs to be applied to the data files is applied - including the redo changes vectors that describe changes to the undo blocks - that&#039;s how Oracle bring the database up to date on recovery, and the changes to the undo blocks mean that after (forward) recovery any uncommitted transactions that Oracle finds in the undo segments can be rolled back properly.]]></description>
		<content:encoded><![CDATA[<p>Nilesh,</p>
<p>Every block change is described in the redo &#8211; even the changes which are the changes to the undo blocks.<br />
On recovery (instance or media) every redo change vector that needs to be applied to the data files is applied &#8211; including the redo changes vectors that describe changes to the undo blocks &#8211; that&#8217;s how Oracle bring the database up to date on recovery, and the changes to the undo blocks mean that after (forward) recovery any uncommitted transactions that Oracle finds in the undo segments can be rolled back properly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nilesh</title>
		<link>http://jonathanlewis.wordpress.com/2011/01/03/redo/#comment-40577</link>
		<dc:creator><![CDATA[Nilesh]]></dc:creator>
		<pubDate>Sat, 28 May 2011 06:57:32 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=5407#comment-40577</guid>
		<description><![CDATA[Thanks for good explaination but i want to know what is used of undo part which is associate with redo vector?means how this undo part is used by oracle]]></description>
		<content:encoded><![CDATA[<p>Thanks for good explaination but i want to know what is used of undo part which is associate with redo vector?means how this undo part is used by oracle</p>
]]></content:encoded>
	</item>
</channel>
</rss>
