<?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: Going too fast</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2008/10/14/going-too-fast/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2008/10/14/going-too-fast/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Mon, 20 May 2013 01:44:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: dhoogfr</title>
		<link>http://jonathanlewis.wordpress.com/2008/10/14/going-too-fast/#comment-32118</link>
		<dc:creator><![CDATA[dhoogfr]]></dc:creator>
		<pubDate>Sat, 18 Oct 2008 18:34:38 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=651#comment-32118</guid>
		<description><![CDATA[&quot;For users of 9i, I wrote a note some time ago about how you can easily capture old stats as you create new stats.&quot;

[unbelievable shameless plug]
or they van use my analyzethis package: http://freekdhooge.wordpress.com/analyzethis/
[/unbelievable shameless plug]

:)]]></description>
		<content:encoded><![CDATA[<p>&#8220;For users of 9i, I wrote a note some time ago about how you can easily capture old stats as you create new stats.&#8221;</p>
<p>[unbelievable shameless plug]<br />
or they van use my analyzethis package: <a href="http://freekdhooge.wordpress.com/analyzethis/" rel="nofollow">http://freekdhooge.wordpress.com/analyzethis/</a><br />
[/unbelievable shameless plug]</p>
<p>:)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/10/14/going-too-fast/#comment-32114</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sat, 18 Oct 2008 16:45:02 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=651#comment-32114</guid>
		<description><![CDATA[Freek,

Thanks for the comment - I mentioned the relevant tables in the original note (wri$_opsstat_%_history) but I always think of wri$ tables as being part of AWR and therefore needing the licence.  The correction and the comment about the new functions in dbms_stats in 10.2.0.4 are both useful.

For users of 9i, I wrote a note some time ago about how &lt;a href=&quot;http://jonathanlewis.wordpress.com/2006/12/03/saving-statistics/&quot; rel=&quot;nofollow&quot;&gt;you can easily capture old stats&lt;/a&gt; as you create new stats.]]></description>
		<content:encoded><![CDATA[<p>Freek,</p>
<p>Thanks for the comment &#8211; I mentioned the relevant tables in the original note (wri$_opsstat_%_history) but I always think of wri$ tables as being part of AWR and therefore needing the licence.  The correction and the comment about the new functions in dbms_stats in 10.2.0.4 are both useful.</p>
<p>For users of 9i, I wrote a note some time ago about how <a href="http://jonathanlewis.wordpress.com/2006/12/03/saving-statistics/" rel="nofollow">you can easily capture old stats</a> as you create new stats.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Freek</title>
		<link>http://jonathanlewis.wordpress.com/2008/10/14/going-too-fast/#comment-32109</link>
		<dc:creator><![CDATA[Freek]]></dc:creator>
		<pubDate>Sat, 18 Oct 2008 11:37:12 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=651#comment-32109</guid>
		<description><![CDATA[Jonathan,

In 10g Oracle also takes automatic backups when gathering new statistics, so even without AWR license you could look at the backup statistics to compare them.
In 10.2.0.4 there are even diff_table_stats_* functions that you can use to compare statistics.

regards

Freek]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>In 10g Oracle also takes automatic backups when gathering new statistics, so even without AWR license you could look at the backup statistics to compare them.<br />
In 10.2.0.4 there are even diff_table_stats_* functions that you can use to compare statistics.</p>
<p>regards</p>
<p>Freek</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/10/14/going-too-fast/#comment-32103</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sat, 18 Oct 2008 07:12:45 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=651#comment-32103</guid>
		<description><![CDATA[Tom,

If you disable bind-peeking for this update, the optimizer changes from: 


&lt;blockquote&gt;&lt;code&gt;&quot;batch_date = {peeked value which is higher than the high_value}&quot;&lt;/code&gt;&lt;/blockquote&gt;

 
to 


&lt;blockquote&gt;&lt;code&gt;&quot;batch_date = {unknown value that is assumed to be one of the num_distinct values in the column}&quot;&lt;/code&gt;&lt;/blockquote&gt;

so the aritmetic can change. In this particular case, if the &quot;badness&quot; of the stats is in the high value, but the rest of the stats (e.g. num_rows, num_distinct) are about right then the optimizer could produce a better plan.


Anthony,
I wouldn&#039;t do this to solve problems with one or two queries.  But on a temporary basis, to handle an urgent migration, it would be something I&#039;d test if I had a huge number of problems that couldn&#039;t be addressed any other way.

The experiences I&#039;ve had of problems caused by peeking are largely related to the 10g upgrade resulting in lots of &quot;unexpected&quot; histograms being generated by the automatic stats collection.
]]></description>
		<content:encoded><![CDATA[<p>Tom,</p>
<p>If you disable bind-peeking for this update, the optimizer changes from: </p>
<blockquote><p><code>"batch_date = {peeked value which is higher than the high_value}"</code></p></blockquote>
<p>to </p>
<blockquote><p><code>"batch_date = {unknown value that is assumed to be one of the num_distinct values in the column}"</code></p></blockquote>
<p>so the aritmetic can change. In this particular case, if the &#8220;badness&#8221; of the stats is in the high value, but the rest of the stats (e.g. num_rows, num_distinct) are about right then the optimizer could produce a better plan.</p>
<p>Anthony,<br />
I wouldn&#8217;t do this to solve problems with one or two queries.  But on a temporary basis, to handle an urgent migration, it would be something I&#8217;d test if I had a huge number of problems that couldn&#8217;t be addressed any other way.</p>
<p>The experiences I&#8217;ve had of problems caused by peeking are largely related to the 10g upgrade resulting in lots of &#8220;unexpected&#8221; histograms being generated by the automatic stats collection.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/10/14/going-too-fast/#comment-32099</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sat, 18 Oct 2008 06:53:18 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=651#comment-32099</guid>
		<description><![CDATA[Rudi,

I believe you&#039;re right about the outer/inner thing. When I saw it, I couldn&#039;t think of an example of this type where it would make a difference (even if you have a nvl(sum()) in the subquery) and it wouldn&#039;t make any difference in this case.

In fact, if you check the original SQL you&#039;ll see that one predicate is &quot;outered&quot; and the other is &quot;innered&quot;. Because of the latter, Oracle will remove the &quot;outer&quot; anyway - but you would only be able to see that if you checked the filter predicates of the execution plan.]]></description>
		<content:encoded><![CDATA[<p>Rudi,</p>
<p>I believe you&#8217;re right about the outer/inner thing. When I saw it, I couldn&#8217;t think of an example of this type where it would make a difference (even if you have a nvl(sum()) in the subquery) and it wouldn&#8217;t make any difference in this case.</p>
<p>In fact, if you check the original SQL you&#8217;ll see that one predicate is &#8220;outered&#8221; and the other is &#8220;innered&#8221;. Because of the latter, Oracle will remove the &#8220;outer&#8221; anyway &#8211; but you would only be able to see that if you checked the filter predicates of the execution plan.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rudi Kristanto</title>
		<link>http://jonathanlewis.wordpress.com/2008/10/14/going-too-fast/#comment-32098</link>
		<dc:creator><![CDATA[Rudi Kristanto]]></dc:creator>
		<pubDate>Sat, 18 Oct 2008 05:20:19 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=651#comment-32098</guid>
		<description><![CDATA[Jonathan,

I thought that adding outer join in the subquery add no meaning in the updating process. Is this my opinion correct ?

Thank you,
Rudi Kristanto]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>I thought that adding outer join in the subquery add no meaning in the updating process. Is this my opinion correct ?</p>
<p>Thank you,<br />
Rudi Kristanto</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://jonathanlewis.wordpress.com/2008/10/14/going-too-fast/#comment-32096</link>
		<dc:creator><![CDATA[Tom]]></dc:creator>
		<pubDate>Fri, 17 Oct 2008 23:17:16 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=651#comment-32096</guid>
		<description><![CDATA[How is disabling bind variable peeking going to fix issues when the bad execution plan is based on bad stats? If the query has not been parsed yet, it will be parsed with the bad plan. Once it is parsed, it&#039;s parsed. If the query you are executing parses the same, it will use that plan. I may be wrong, but that&#039;s how I see it.]]></description>
		<content:encoded><![CDATA[<p>How is disabling bind variable peeking going to fix issues when the bad execution plan is based on bad stats? If the query has not been parsed yet, it will be parsed with the bad plan. Once it is parsed, it&#8217;s parsed. If the query you are executing parses the same, it will use that plan. I may be wrong, but that&#8217;s how I see it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony Cordell</title>
		<link>http://jonathanlewis.wordpress.com/2008/10/14/going-too-fast/#comment-32085</link>
		<dc:creator><![CDATA[Anthony Cordell]]></dc:creator>
		<pubDate>Tue, 14 Oct 2008 20:41:59 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=651#comment-32085</guid>
		<description><![CDATA[Another alternative (assuming your assumptions about the high value is correct) since the query uses bind variables might be to get Oracle&#039;s blessing to disable bind variable peeking (_optim_peek_user_binds=false).  In my experience it causes far more problems with unstable plans in a production environment than it fixes.  I&#039;m sure others&#039; mileage will vary.]]></description>
		<content:encoded><![CDATA[<p>Another alternative (assuming your assumptions about the high value is correct) since the query uses bind variables might be to get Oracle&#8217;s blessing to disable bind variable peeking (_optim_peek_user_binds=false).  In my experience it causes far more problems with unstable plans in a production environment than it fixes.  I&#8217;m sure others&#8217; mileage will vary.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
