<?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: Ouch!</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2012/01/26/ouch/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2012/01/26/ouch/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Sat, 18 May 2013 11:04:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Pavol Babel</title>
		<link>http://jonathanlewis.wordpress.com/2012/01/26/ouch/#comment-44953</link>
		<dc:creator><![CDATA[Pavol Babel]]></dc:creator>
		<pubDate>Tue, 07 Feb 2012 02:41:11 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=8169#comment-44953</guid>
		<description><![CDATA[Jonathan,

we hit this unpleasant situation several times in 9iR2. We had few huge tables (several 100s of GB), which were filled by direct path reads every day. There were some weekly reports which used only part of those tables, but still selected large volume of data. The only sensible execution plan was using indexes and nested loops joins.  There was a lot of work done by reports to do the delayed block cleanout work. But from time to time, it was really expensive because of finding commit time (when few commit intensive jobs started in parallel with our reports)
The nasty thing is oracle does not provide simple solution to this issue. Oracle introduced (I think it was 9iR2) optimization for FTS of data imported by direct path read operation. Oracle is able to find chunks of data filled by one direct path job and will perform delayed block cleanout only for the very first data block ( this is one of the reasons why blocks formatted by direct path have initially 3 ITL slots). Mentioned optimization is not possible for INDEX RANGE SCAN, causing several headaches to me and my colleagues, because we were unable to clean all &quot;dirty&quot; blocks in efficient way (just like with single session direct path reads in 11g).

The issue could be even worse for data stored in read only tablespaces.

Regards
Pavol Babel]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>we hit this unpleasant situation several times in 9iR2. We had few huge tables (several 100s of GB), which were filled by direct path reads every day. There were some weekly reports which used only part of those tables, but still selected large volume of data. The only sensible execution plan was using indexes and nested loops joins.  There was a lot of work done by reports to do the delayed block cleanout work. But from time to time, it was really expensive because of finding commit time (when few commit intensive jobs started in parallel with our reports)<br />
The nasty thing is oracle does not provide simple solution to this issue. Oracle introduced (I think it was 9iR2) optimization for FTS of data imported by direct path read operation. Oracle is able to find chunks of data filled by one direct path job and will perform delayed block cleanout only for the very first data block ( this is one of the reasons why blocks formatted by direct path have initially 3 ITL slots). Mentioned optimization is not possible for INDEX RANGE SCAN, causing several headaches to me and my colleagues, because we were unable to clean all &#8220;dirty&#8221; blocks in efficient way (just like with single session direct path reads in 11g).</p>
<p>The issue could be even worse for data stored in read only tablespaces.</p>
<p>Regards<br />
Pavol Babel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2012/01/26/ouch/#comment-44724</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sat, 28 Jan 2012 10:49:05 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=8169#comment-44724</guid>
		<description><![CDATA[John,

Feel free to bring it up. In fact I&#039;ll probably be in the audience anyway.

I&#039;m not sure that doing periodic scans would help because the problem relates to changes made after the report starts running. 

In the old days (pre-automatic undo management, undo autotuning etc.) the problem would probably have shown up as an ORA-01555 error. The fact that there&#039;s lots of undo available to protect you from the crash is the source of the extra work you do trying to complete the report.]]></description>
		<content:encoded><![CDATA[<p>John,</p>
<p>Feel free to bring it up. In fact I&#8217;ll probably be in the audience anyway.</p>
<p>I&#8217;m not sure that doing periodic scans would help because the problem relates to changes made after the report starts running. </p>
<p>In the old days (pre-automatic undo management, undo autotuning etc.) the problem would probably have shown up as an ORA-01555 error. The fact that there&#8217;s lots of undo available to protect you from the crash is the source of the extra work you do trying to complete the report.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2012/01/26/ouch/#comment-44723</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sat, 28 Jan 2012 10:42:20 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=8169#comment-44723</guid>
		<description><![CDATA[Christo,

I think the minscn is supposed to help when it&#039;s possible to determine logically a minimum SCN by which the commit must have happened - for example the commit on a block in a read-only tablespace must have happened before the tablespace went read-only. 

In a busy system, though, if you are constantly changing (and committing) data and I start to run a long query, there have to be cases where I can know that you&#039;ve committed a transaction, but need to know exactly when you committed that transaction. 

]]></description>
		<content:encoded><![CDATA[<p>Christo,</p>
<p>I think the minscn is supposed to help when it&#8217;s possible to determine logically a minimum SCN by which the commit must have happened &#8211; for example the commit on a block in a read-only tablespace must have happened before the tablespace went read-only. </p>
<p>In a busy system, though, if you are constantly changing (and committing) data and I start to run a long query, there have to be cases where I can know that you&#8217;ve committed a transaction, but need to know exactly when you committed that transaction. </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2012/01/26/ouch/#comment-44722</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sat, 28 Jan 2012 10:38:34 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=8169#comment-44722</guid>
		<description><![CDATA[Raova,

Thanks, wseful follow-up (even though the scale of the issue isn&#039;t in the same order of magnitutude).

I&#039;ve always assumed that this could happen on a RAC system that tried to do OLTP on one node and reporting on the other, but I&#039;ve not actually seen it on a production system. If you have access to metalink there are a couple of bugs/notes addressing exactly this type of symptom. In part it relates to the effects of undo autotuning and the way that you can end up with very large undo segments.]]></description>
		<content:encoded><![CDATA[<p>Raova,</p>
<p>Thanks, wseful follow-up (even though the scale of the issue isn&#8217;t in the same order of magnitutude).</p>
<p>I&#8217;ve always assumed that this could happen on a RAC system that tried to do OLTP on one node and reporting on the other, but I&#8217;ve not actually seen it on a production system. If you have access to metalink there are a couple of bugs/notes addressing exactly this type of symptom. In part it relates to the effects of undo autotuning and the way that you can end up with very large undo segments.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Darrah</title>
		<link>http://jonathanlewis.wordpress.com/2012/01/26/ouch/#comment-44712</link>
		<dc:creator><![CDATA[John Darrah]]></dc:creator>
		<pubDate>Fri, 27 Jan 2012 18:03:37 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=8169#comment-44712</guid>
		<description><![CDATA[Jonathan,

I guess there really is no such thing as a free lunch.  The scenario you describe would be pretty common for people trying to leverage their standby as reporting environment.  I guess one way to mitigate this type of behavior would be to periodic full scans of the most used reporting tables but even that may not help if the tables are read direct: http://antognini.ch/2009/07/impact-of-direct-reads-on-delayed-block-cleanouts/,  This is a really good caveat for people to be aware of when considering Active Standby Database.  I&#039;m actually presenting on how to leverage some Oracle features to clone databases at this year&#039;s RMOUG event.  Would you mind if I brought this up (giving you your due credit of course)?

John]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>I guess there really is no such thing as a free lunch.  The scenario you describe would be pretty common for people trying to leverage their standby as reporting environment.  I guess one way to mitigate this type of behavior would be to periodic full scans of the most used reporting tables but even that may not help if the tables are read direct: <a href="http://antognini.ch/2009/07/impact-of-direct-reads-on-delayed-block-cleanouts/" rel="nofollow">http://antognini.ch/2009/07/impact-of-direct-reads-on-delayed-block-cleanouts/</a>,  This is a really good caveat for people to be aware of when considering Active Standby Database.  I&#8217;m actually presenting on how to leverage some Oracle features to clone databases at this year&#8217;s RMOUG event.  Would you mind if I brought this up (giving you your due credit of course)?</p>
<p>John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christo Kutrovsky</title>
		<link>http://jonathanlewis.wordpress.com/2012/01/26/ouch/#comment-44711</link>
		<dc:creator><![CDATA[Christo Kutrovsky]]></dc:creator>
		<pubDate>Fri, 27 Jan 2012 17:01:39 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=8169#comment-44711</guid>
		<description><![CDATA[Wasn&#039;t there a &quot;minscn&quot; optimization that&#039;s supposed to kick in? Isn&#039;t this the reason why restarting the report queries helped in your case?]]></description>
		<content:encoded><![CDATA[<p>Wasn&#8217;t there a &#8220;minscn&#8221; optimization that&#8217;s supposed to kick in? Isn&#8217;t this the reason why restarting the report queries helped in your case?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: raova</title>
		<link>http://jonathanlewis.wordpress.com/2012/01/26/ouch/#comment-44702</link>
		<dc:creator><![CDATA[raova]]></dc:creator>
		<pubDate>Fri, 27 Jan 2012 10:40:40 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=8169#comment-44702</guid>
		<description><![CDATA[Even I could see this kind of activity on our database. It is 2 node RAC cluster running ETL on one node and reports on the other node.

&lt;pre&gt;
NAME                                                                                VALUE
---------------------------------------------------------------- ------------------------
session logical reads                                                     347,206,851,483
consistent gets                                                           314,535,839,356
consistent gets - examination                                              46,844,294,185
transaction tables consistent reads - undo records applied                      9,809,799
transaction tables consistent read rollbacks                                       15,213&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>Even I could see this kind of activity on our database. It is 2 node RAC cluster running ETL on one node and reports on the other node.</p>
<pre>
NAME                                                                                VALUE
---------------------------------------------------------------- ------------------------
session logical reads                                                     347,206,851,483
consistent gets                                                           314,535,839,356
consistent gets - examination                                              46,844,294,185
transaction tables consistent reads - undo records applied                      9,809,799
transaction tables consistent read rollbacks                                       15,213</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2012/01/26/ouch/#comment-44697</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 26 Jan 2012 23:32:54 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=8169#comment-44697</guid>
		<description><![CDATA[John,

I think I&#039;d have to agree with your assessment. There are a couple of anomalies that I want to look into in case they are contributing (or exacerbating) factors, but I think the effect appears because 
&lt;blockquote&gt;
a) the standby can&#039;t cleanout blocks when it visits them - it&#039;s read-only
b) the primary isn&#039;t going to clean every block out very promptly because the nature of the application means that some blocks that get changed will only be revisited (at least in the near future) by the reports.
c) lots of blocks will be changed, committed, but not cleaned out in the primary as some of the biggest reports are running in the standby
&lt;/blockquote&gt;]]></description>
		<content:encoded><![CDATA[<p>John,</p>
<p>I think I&#8217;d have to agree with your assessment. There are a couple of anomalies that I want to look into in case they are contributing (or exacerbating) factors, but I think the effect appears because </p>
<blockquote><p>
a) the standby can&#8217;t cleanout blocks when it visits them &#8211; it&#8217;s read-only<br />
b) the primary isn&#8217;t going to clean every block out very promptly because the nature of the application means that some blocks that get changed will only be revisited (at least in the near future) by the reports.<br />
c) lots of blocks will be changed, committed, but not cleaned out in the primary as some of the biggest reports are running in the standby
</p></blockquote>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Darrah</title>
		<link>http://jonathanlewis.wordpress.com/2012/01/26/ouch/#comment-44682</link>
		<dc:creator><![CDATA[John Darrah]]></dc:creator>
		<pubDate>Thu, 26 Jan 2012 21:22:26 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=8169#comment-44682</guid>
		<description><![CDATA[Jonathan,

If I am understanding this correctly, this is not a bug but rather just a normal consequence of the active standby continuing to recover as it is begin queried.  Is my understanding correct?

Thanks,

John]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>If I am understanding this correctly, this is not a bug but rather just a normal consequence of the active standby continuing to recover as it is begin queried.  Is my understanding correct?</p>
<p>Thanks,</p>
<p>John</p>
]]></content:encoded>
	</item>
</channel>
</rss>
