<?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: Undo Quiz &#8211; Bringing the Right Tools for the Job</title>
	<atom:link href="http://hoopercharles.wordpress.com/2012/09/17/undo-quiz-bringing-the-right-tools-for-the-job/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoopercharles.wordpress.com/2012/09/17/undo-quiz-bringing-the-right-tools-for-the-job/</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: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2012/09/17/undo-quiz-bringing-the-right-tools-for-the-job/#comment-5305</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Sun, 10 Mar 2013 18:52:06 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6639#comment-5305</guid>
		<description><![CDATA[Well, that took a while!  I was finally able to fix the formatting of this blog so that the pages are again almost (99%) as wide as the browser window, rather than having the entire page being confined to a width of 780 pixels.]]></description>
		<content:encoded><![CDATA[<p>Well, that took a while!  I was finally able to fix the formatting of this blog so that the pages are again almost (99%) as wide as the browser window, rather than having the entire page being confined to a width of 780 pixels.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2012/09/17/undo-quiz-bringing-the-right-tools-for-the-job/#comment-4982</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Sun, 14 Oct 2012 13:44:21 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6639#comment-4982</guid>
		<description><![CDATA[David,

Sorry for the delay in responding.  Wordpress has apparently decided to return the formatting of my blog as a narrow column of text, rather than the full screen width that I configured when I bought the custom CSS option nearly 3 years ago.  I am still trying to find a work around for that issue.  Between that and fighting with a couple of high-definition security camera that refuse to work correctly, I have not had sufficient free time to check for comments posted to the blog.  My review of the high-definition security camera is now live on Amazon&#039;s site:
http://www.amazon.com/Ycam-Wireless-Definition-Camera-YCBLHD6/product-reviews/B00890H5PQ/ref=cm_cr_dp_text?ie=UTF8&amp;showViewpoints=0#R2RTAQQ0S9CV9X

---

Overall, nice answers.  Just a few comments:

1) &lt;b&gt;How it is possible for Oracle Database to provide a read consistent view of a table that requires approximately 88MB of storage space when the file supporting the undo tablespace cannot exceed 1MB?&lt;/b&gt; &lt;i&gt;That is as well worded as anything I could have written.&lt;/i&gt;

2) &lt;b&gt;Why did the first select of the table require 81 more consistent gets than the second select from that table?&lt;/b&gt; &lt;i&gt;That is as well worded as anything I could have written.&lt;/i&gt;

3) &lt;b&gt;Why is Oracle attempting to extend a segment when the session is deleting rows; also, what does the number 8 signify?&lt;/b&gt; &lt;i&gt;Good answer - the Oracle error could have better explained the meaning of 8.  Regarding your answer, it would have been slightly more clear to mention that Oracle Database was attempting to allocate another undo extent (64KB in size due to the use of ASSM autoallocate) --- I believe that is your implied answer.&lt;/i&gt;

4) &lt;b&gt;why was the 30 row delete from table T10 successful when the SMALL_UNDO2 undo tablespace was the default undo tablespace, yet that delete failed when the SMALL_UNDO tablespace was set as the default tablespace – until 3 rows were first deleted from the table?&lt;/b&gt; &lt;i&gt;David, I am not sure that your answer is completely correct.  The undo from a session cannot be overwritten until that session issues a commit, and the session executing the deletes never executed a commit (sorry if the commit frequency was not very clear).  You do make good points regarding how undo retention works.  If I recall correctly, when I wrote the question, I noticed that the documentation for 11.2 mentioned that there were certain default behaviors when UNDO tablespaces are created.&lt;/i&gt;

5) &lt;b&gt;What type of compression is used in undo logs?&lt;/b&gt; &lt;i&gt;I don&#039;t think that anyone has attempted to answer this question yet.  Odd, the comment about compression of &quot;undo logs&quot; seems to have been removed from the forum thread.  Of course, one might question what is an undo log?&lt;/i&gt;]]></description>
		<content:encoded><![CDATA[<p>David,</p>
<p>Sorry for the delay in responding.  WordPress has apparently decided to return the formatting of my blog as a narrow column of text, rather than the full screen width that I configured when I bought the custom CSS option nearly 3 years ago.  I am still trying to find a work around for that issue.  Between that and fighting with a couple of high-definition security camera that refuse to work correctly, I have not had sufficient free time to check for comments posted to the blog.  My review of the high-definition security camera is now live on Amazon&#8217;s site:<br />
<a href="http://www.amazon.com/Ycam-Wireless-Definition-Camera-YCBLHD6/product-reviews/B00890H5PQ/ref=cm_cr_dp_text?ie=UTF8&#038;showViewpoints=0#R2RTAQQ0S9CV9X" rel="nofollow">http://www.amazon.com/Ycam-Wireless-Definition-Camera-YCBLHD6/product-reviews/B00890H5PQ/ref=cm_cr_dp_text?ie=UTF8&#038;showViewpoints=0#R2RTAQQ0S9CV9X</a></p>
<p>&#8212;</p>
<p>Overall, nice answers.  Just a few comments:</p>
<p>1) <b>How it is possible for Oracle Database to provide a read consistent view of a table that requires approximately 88MB of storage space when the file supporting the undo tablespace cannot exceed 1MB?</b> <i>That is as well worded as anything I could have written.</i></p>
<p>2) <b>Why did the first select of the table require 81 more consistent gets than the second select from that table?</b> <i>That is as well worded as anything I could have written.</i></p>
<p>3) <b>Why is Oracle attempting to extend a segment when the session is deleting rows; also, what does the number 8 signify?</b> <i>Good answer &#8211; the Oracle error could have better explained the meaning of 8.  Regarding your answer, it would have been slightly more clear to mention that Oracle Database was attempting to allocate another undo extent (64KB in size due to the use of ASSM autoallocate) &#8212; I believe that is your implied answer.</i></p>
<p>4) <b>why was the 30 row delete from table T10 successful when the SMALL_UNDO2 undo tablespace was the default undo tablespace, yet that delete failed when the SMALL_UNDO tablespace was set as the default tablespace – until 3 rows were first deleted from the table?</b> <i>David, I am not sure that your answer is completely correct.  The undo from a session cannot be overwritten until that session issues a commit, and the session executing the deletes never executed a commit (sorry if the commit frequency was not very clear).  You do make good points regarding how undo retention works.  If I recall correctly, when I wrote the question, I noticed that the documentation for 11.2 mentioned that there were certain default behaviors when UNDO tablespaces are created.</i></p>
<p>5) <b>What type of compression is used in undo logs?</b> <i>I don&#8217;t think that anyone has attempted to answer this question yet.  Odd, the comment about compression of &#8220;undo logs&#8221; seems to have been removed from the forum thread.  Of course, one might question what is an undo log?</i></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dfitzjarrell</title>
		<link>http://hoopercharles.wordpress.com/2012/09/17/undo-quiz-bringing-the-right-tools-for-the-job/#comment-4977</link>
		<dc:creator><![CDATA[dfitzjarrell]]></dc:creator>
		<pubDate>Fri, 12 Oct 2012 21:00:22 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6639#comment-4977</guid>
		<description><![CDATA[1) As mentioned before the data is already in a consistent state so no undo is generated.

2) I agree that the difference in consistent gets is the hard parse.

3) The 8 is the number of blocks that can&#039;t be allocated for the larger deletes; the smaller deletes have sufficient space for the undo records.

4) The retention guarantee, I believe, creates this issue -- it&#039;s the only difference between 
the two undo tablespaces.  If the undo_retention parameter isn&#039;t changed from its default value (mine is set to 5 in my 11.2.0.3 database) then it&#039;s likely that Oracle considers the current undo (whatever it may be) as unexpired and refuses to overwrite it while the retention guarantee is in place.  Once 5 seconds have elapsed (easily the time between the first delete attempt and the second) the undo is available.  So, to my knowledge, it&#039;s not the second delete that frees the undo space it&#039;s the elapsed time between the delete attempts that allows the second and subsequent deletes (that aren&#039;t too large) to succeed.  As there is no retention guarantee in place for the second undo tablespace Oracle need not preserve unexpired undo should it need the space for further transactions.]]></description>
		<content:encoded><![CDATA[<p>1) As mentioned before the data is already in a consistent state so no undo is generated.</p>
<p>2) I agree that the difference in consistent gets is the hard parse.</p>
<p>3) The 8 is the number of blocks that can&#8217;t be allocated for the larger deletes; the smaller deletes have sufficient space for the undo records.</p>
<p>4) The retention guarantee, I believe, creates this issue &#8212; it&#8217;s the only difference between<br />
the two undo tablespaces.  If the undo_retention parameter isn&#8217;t changed from its default value (mine is set to 5 in my 11.2.0.3 database) then it&#8217;s likely that Oracle considers the current undo (whatever it may be) as unexpired and refuses to overwrite it while the retention guarantee is in place.  Once 5 seconds have elapsed (easily the time between the first delete attempt and the second) the undo is available.  So, to my knowledge, it&#8217;s not the second delete that frees the undo space it&#8217;s the elapsed time between the delete attempts that allows the second and subsequent deletes (that aren&#8217;t too large) to succeed.  As there is no retention guarantee in place for the second undo tablespace Oracle need not preserve unexpired undo should it need the space for further transactions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2012/09/17/undo-quiz-bringing-the-right-tools-for-the-job/#comment-4944</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Tue, 18 Sep 2012 18:04:11 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6639#comment-4944</guid>
		<description><![CDATA[Tony,

Yes, I am interested in seeing appropriate answers for the questions - might help people who are searching for answers to similar questions.  For the record, some of these questions appeared on the OTN forums in the past, using slightly different wording.  There are certainly experienced DBAs reading this blog, and there is a good chance that the answers provided by one or more readers will be better than my answers (a consensus on how things work is usually better than one man&#039;s opinion).

How have you done?  I like your answers to questions 1 and 2.]]></description>
		<content:encoded><![CDATA[<p>Tony,</p>
<p>Yes, I am interested in seeing appropriate answers for the questions &#8211; might help people who are searching for answers to similar questions.  For the record, some of these questions appeared on the OTN forums in the past, using slightly different wording.  There are certainly experienced DBAs reading this blog, and there is a good chance that the answers provided by one or more readers will be better than my answers (a consensus on how things work is usually better than one man&#8217;s opinion).</p>
<p>How have you done?  I like your answers to questions 1 and 2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2012/09/17/undo-quiz-bringing-the-right-tools-for-the-job/#comment-4943</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Tue, 18 Sep 2012 17:39:39 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6639#comment-4943</guid>
		<description><![CDATA[David,

Sorry for the delay in your comment appearing - certain words seem to trigger Wordpress&#039; spam filter.

I just tried replying to the thread and received the message &quot;Sorry, you do not have permission to reply to that topic.&quot;, so it does appear that replying to that thread is restricted.

The one reply that the OP received in the thread is incomplete.  That reply seems to suggest that it is the SELECT that receives the &quot;ORA-30036: unable to extend segment by &lt;i&gt;n&lt;/i&gt; in undo tablespace&quot; in the undo tablespaces&#039; files are unable to expand to the size of the tables that are queried.  The OP in the thread might have been thinking about &quot;ORA-01555: snapshot too old&quot;, however, that error would not apply in the OP&#039;s test case.

---

Off subject humor (unrelated to David&#039;s comment) 1- what was the guy on the purple mule attempting to accomplish?:
* He is a Windows 1.0 beta tester, still reporting bugs found in the field, his report: 1 moth dead due to heat exhaustion, 3 lady bugs, and a frog.
* He is a Windows 8.0 beta tester trying to get the hang of the touch screen interface.
* He found that Windows 8.0 requires new hardware, and found that a tire iron is the perfect accessory for disabling the Windows Metro interface.
* He decided to re-tire, but forget where he parked the car.
* He is a trademark infringement lawyer for Microsoft, researching a lawsuit against the hole in the wall companies that sell unrelated products under the Windows label.
* He is looking for the cliff-jumping little red riding horse.
* He was checking to see if the Window violated any of Sun&#039;s patents, such as those covering OpenWindows (http://en.wikipedia.org/wiki/OpenWindows).
* He was interested in checking out the scene at the police bars that he had heard so much about.]]></description>
		<content:encoded><![CDATA[<p>David,</p>
<p>Sorry for the delay in your comment appearing &#8211; certain words seem to trigger WordPress&#8217; spam filter.</p>
<p>I just tried replying to the thread and received the message &#8220;Sorry, you do not have permission to reply to that topic.&#8221;, so it does appear that replying to that thread is restricted.</p>
<p>The one reply that the OP received in the thread is incomplete.  That reply seems to suggest that it is the SELECT that receives the &#8220;ORA-30036: unable to extend segment by <i>n</i> in undo tablespace&#8221; in the undo tablespaces&#8217; files are unable to expand to the size of the tables that are queried.  The OP in the thread might have been thinking about &#8220;ORA-01555: snapshot too old&#8221;, however, that error would not apply in the OP&#8217;s test case.</p>
<p>&#8212;</p>
<p>Off subject humor (unrelated to David&#8217;s comment) 1- what was the guy on the purple mule attempting to accomplish?:<br />
* He is a Windows 1.0 beta tester, still reporting bugs found in the field, his report: 1 moth dead due to heat exhaustion, 3 lady bugs, and a frog.<br />
* He is a Windows 8.0 beta tester trying to get the hang of the touch screen interface.<br />
* He found that Windows 8.0 requires new hardware, and found that a tire iron is the perfect accessory for disabling the Windows Metro interface.<br />
* He decided to re-tire, but forget where he parked the car.<br />
* He is a trademark infringement lawyer for Microsoft, researching a lawsuit against the hole in the wall companies that sell unrelated products under the Windows label.<br />
* He is looking for the cliff-jumping little red riding horse.<br />
* He was checking to see if the Window violated any of Sun&#8217;s patents, such as those covering OpenWindows (<a href="http://en.wikipedia.org/wiki/OpenWindows" rel="nofollow">http://en.wikipedia.org/wiki/OpenWindows</a>).<br />
* He was interested in checking out the scene at the police bars that he had heard so much about.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Sleight</title>
		<link>http://hoopercharles.wordpress.com/2012/09/17/undo-quiz-bringing-the-right-tools-for-the-job/#comment-4942</link>
		<dc:creator><![CDATA[Tony Sleight]]></dc:creator>
		<pubDate>Tue, 18 Sep 2012 16:11:21 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6639#comment-4942</guid>
		<description><![CDATA[And he appears to understand as much about UNDO as the OP. It is a downside to the internet that bad information is as freely available as good information and sadly sometimes the bad information is more popular and returns search results in the top entries.

Charles, are you wanting answers to the questions posed? My small understanding of UNDO is that a select does not create undo unless a transaction is outstanding that has not commited changes to the data you are looking at. So,

Question 1) Undo isn&#039;t used here to get a read consistent view of the data. The data is already in a consistent state.

Question 2) I&#039;m sure the difference in consistent gets is the hard parse of the select statement indicated by the 11 recursive calls dropping to zero the second time.

Question 3)The delete&#039;s will create undo records so that this transaction can roll back. That&#039;s where the extend has originated. Deleting 300,000 records will result in an attempt to create 300,000 undo records one for each row deleted. This requirement broke the 1M limit. The transaction rolled back, so 1M of undo was now available. Deleting 30 rows required less than 1M so this was successful. I&#039;m not sure as to the value of 8, but I would hazard a guess it is the smallest automatic extent size in blocks?

I am now at my limit of undo knowledge, so those more knowledgeable than my self can pick up the baton!

I will guess, that RETENTION GUARANTEE according to the documentation 

http://docs.oracle.com/cd/B12037_01/server.101/b10739/undo.htm#BJFJCHCB

&#039;By enabling the guarantee option, you instruct the database not to overwrite unexpired undo data even if it means risking failure of currently active DML operations.&#039;

So, the delete of 30 records failed due to the first deletes that filled up the tablespace not being reused as they hadn&#039;t expired. When you ran the next set, the undo records had expired and so were re-used.

I&#039;m not sure compression is used, however, encoding will be, so rather than contain an INSERT for every DELETE it will be encoded in the UNDO record.

How have I done?]]></description>
		<content:encoded><![CDATA[<p>And he appears to understand as much about UNDO as the OP. It is a downside to the internet that bad information is as freely available as good information and sadly sometimes the bad information is more popular and returns search results in the top entries.</p>
<p>Charles, are you wanting answers to the questions posed? My small understanding of UNDO is that a select does not create undo unless a transaction is outstanding that has not commited changes to the data you are looking at. So,</p>
<p>Question 1) Undo isn&#8217;t used here to get a read consistent view of the data. The data is already in a consistent state.</p>
<p>Question 2) I&#8217;m sure the difference in consistent gets is the hard parse of the select statement indicated by the 11 recursive calls dropping to zero the second time.</p>
<p>Question 3)The delete&#8217;s will create undo records so that this transaction can roll back. That&#8217;s where the extend has originated. Deleting 300,000 records will result in an attempt to create 300,000 undo records one for each row deleted. This requirement broke the 1M limit. The transaction rolled back, so 1M of undo was now available. Deleting 30 rows required less than 1M so this was successful. I&#8217;m not sure as to the value of 8, but I would hazard a guess it is the smallest automatic extent size in blocks?</p>
<p>I am now at my limit of undo knowledge, so those more knowledgeable than my self can pick up the baton!</p>
<p>I will guess, that RETENTION GUARANTEE according to the documentation </p>
<p><a href="http://docs.oracle.com/cd/B12037_01/server.101/b10739/undo.htm#BJFJCHCB" rel="nofollow">http://docs.oracle.com/cd/B12037_01/server.101/b10739/undo.htm#BJFJCHCB</a></p>
<p>&#8216;By enabling the guarantee option, you instruct the database not to overwrite unexpired undo data even if it means risking failure of currently active DML operations.&#8217;</p>
<p>So, the delete of 30 records failed due to the first deletes that filled up the tablespace not being reused as they hadn&#8217;t expired. When you ran the next set, the undo records had expired and so were re-used.</p>
<p>I&#8217;m not sure compression is used, however, encoding will be, so rather than contain an INSERT for every DELETE it will be encoded in the UNDO record.</p>
<p>How have I done?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dfitzjarrell</title>
		<link>http://hoopercharles.wordpress.com/2012/09/17/undo-quiz-bringing-the-right-tools-for-the-job/#comment-4939</link>
		<dc:creator><![CDATA[dfitzjarrell]]></dc:creator>
		<pubDate>Mon, 17 Sep 2012 22:21:44 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=6639#comment-4939</guid>
		<description><![CDATA[It appears Donald K. B. has prevented anyone but himself from commenting or replying to the thread.

&lt;i&gt;(Sorry, comment was initially marked as spam - problem fixed.  CH Sep 18, 2012)&lt;/i&gt;]]></description>
		<content:encoded><![CDATA[<p>It appears Donald K. B. has prevented anyone but himself from commenting or replying to the thread.</p>
<p><i>(Sorry, comment was initially marked as spam &#8211; problem fixed.  CH Sep 18, 2012)</i></p>
]]></content:encoded>
	</item>
</channel>
</rss>
