<?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: Statistics problem</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2008/02/13/statistics-problem/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2008/02/13/statistics-problem/</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/2008/02/13/statistics-problem/#comment-48753</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Tue, 07 Aug 2012 18:11:48 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=341#comment-48753</guid>
		<description><![CDATA[Guillaume,

Two points - I have no idea what &quot;a list of failing instructions&quot; means (is it a set of SQL statements that raise errors), and I don&#039;t have total recall of all the Oracle error messages - so you might consider including the error text when quoting the error number.

In your position I would set event 10046 at level 4 (bind variable capture) when running the code that fails, and then read the trace file.  I would hope to see the actual failing statement (with the error code reported) and capture the current values of the bind variables that caused the error.]]></description>
		<content:encoded><![CDATA[<p>Guillaume,</p>
<p>Two points &#8211; I have no idea what &#8220;a list of failing instructions&#8221; means (is it a set of SQL statements that raise errors), and I don&#8217;t have total recall of all the Oracle error messages &#8211; so you might consider including the error text when quoting the error number.</p>
<p>In your position I would set event 10046 at level 4 (bind variable capture) when running the code that fails, and then read the trace file.  I would hope to see the actual failing statement (with the error code reported) and capture the current values of the bind variables that caused the error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guillaume</title>
		<link>http://jonathanlewis.wordpress.com/2008/02/13/statistics-problem/#comment-48422</link>
		<dc:creator><![CDATA[Guillaume]]></dc:creator>
		<pubDate>Fri, 27 Jul 2012 13:08:33 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=341#comment-48422</guid>
		<description><![CDATA[Hi Jonathan,

I caught this discussion following an issue I met with Oracle SPA. I&#039;m testing ugrade from 10.2.0.4 to 11.2.0.3.

The second trial on 11g triggered a list of failing instructions. All of them using sys_op_lbid and getting an ORA-01760. The only note (ID 317254.1) I found on Metalink didn&#039;t help.Sorry if I&#039;m out-of-scope of the discussion but more than interested in any clue you may have.

Thank you,
Guillaume]]></description>
		<content:encoded><![CDATA[<p>Hi Jonathan,</p>
<p>I caught this discussion following an issue I met with Oracle SPA. I&#8217;m testing ugrade from 10.2.0.4 to 11.2.0.3.</p>
<p>The second trial on 11g triggered a list of failing instructions. All of them using sys_op_lbid and getting an ORA-01760. The only note (ID 317254.1) I found on Metalink didn&#8217;t help.Sorry if I&#8217;m out-of-scope of the discussion but more than interested in any clue you may have.</p>
<p>Thank you,<br />
Guillaume</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/02/13/statistics-problem/#comment-48111</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 19 Jul 2012 09:45:56 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=341#comment-48111</guid>
		<description><![CDATA[Suresh,

No, not that I know of. 
You just have to kill the query and restart it after dealing with the cause of the problem.]]></description>
		<content:encoded><![CDATA[<p>Suresh,</p>
<p>No, not that I know of.<br />
You just have to kill the query and restart it after dealing with the cause of the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: suresh</title>
		<link>http://jonathanlewis.wordpress.com/2008/02/13/statistics-problem/#comment-47981</link>
		<dc:creator><![CDATA[suresh]]></dc:creator>
		<pubDate>Sun, 15 Jul 2012 22:18:24 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=341#comment-47981</guid>
		<description><![CDATA[Hi Jonathan, 

Is there a to change the plan of the running sql? (it is running for 8 hours, still it has long way to go). It picked up wrong plan due to wrong statistics. Is there a way to force the running sql to take new plan that we have identified.

Thank you
Suresh]]></description>
		<content:encoded><![CDATA[<p>Hi Jonathan, </p>
<p>Is there a to change the plan of the running sql? (it is running for 8 hours, still it has long way to go). It picked up wrong plan due to wrong statistics. Is there a way to force the running sql to take new plan that we have identified.</p>
<p>Thank you<br />
Suresh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: I wish &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2008/02/13/statistics-problem/#comment-43121</link>
		<dc:creator><![CDATA[I wish &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Tue, 13 Dec 2011 18:09:22 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=341#comment-43121</guid>
		<description><![CDATA[[...] procedure counts the number of used leaf blocks and the number of distinct keys using a count distinct operation, which means you get an expensive [...]]]></description>
		<content:encoded><![CDATA[<p>[...] procedure counts the number of used leaf blocks and the number of distinct keys using a count distinct operation, which means you get an expensive [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/02/13/statistics-problem/#comment-35866</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Tue, 23 Mar 2010 21:36:33 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=341#comment-35866</guid>
		<description><![CDATA[Shadi,

There are various diffrences between analyze and dbms_stats - not the least of which is what they collect stats on by default.  In 10g the default is for dbms_stats to collect histograms which analyze does not do, and that particular difference has affected a lot of people badly in the past.  

In your case there&#039;s also the possible difference due to an estimate being taken by dbms_stats, compared to your compute from analyze.

If you check the different behaviour between the two commands by testing on a small test schema you may be able to identify the specific detail thats been giving you problems.]]></description>
		<content:encoded><![CDATA[<p>Shadi,</p>
<p>There are various diffrences between analyze and dbms_stats &#8211; not the least of which is what they collect stats on by default.  In 10g the default is for dbms_stats to collect histograms which analyze does not do, and that particular difference has affected a lot of people badly in the past.  </p>
<p>In your case there&#8217;s also the possible difference due to an estimate being taken by dbms_stats, compared to your compute from analyze.</p>
<p>If you check the different behaviour between the two commands by testing on a small test schema you may be able to identify the specific detail thats been giving you problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shadi</title>
		<link>http://jonathanlewis.wordpress.com/2008/02/13/statistics-problem/#comment-35861</link>
		<dc:creator><![CDATA[Shadi]]></dc:creator>
		<pubDate>Tue, 23 Mar 2010 10:08:57 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=341#comment-35861</guid>
		<description><![CDATA[I know it is too late to comment now :-) but I thought I should share my experiance with you.
I have faced this issues many times on Oracle 10gR2 database for E-business Suite, and it seems some how under some condition which I&#039;m not able to findout until now, gather stats job does not work as expected.
And to correct this issue I alway use Analyze table .. compute statistics.

Regards,
Shadi]]></description>
		<content:encoded><![CDATA[<p>I know it is too late to comment now :-) but I thought I should share my experiance with you.<br />
I have faced this issues many times on Oracle 10gR2 database for E-business Suite, and it seems some how under some condition which I&#8217;m not able to findout until now, gather stats job does not work as expected.<br />
And to correct this issue I alway use Analyze table .. compute statistics.</p>
<p>Regards,<br />
Shadi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duplicates when Querying V$TEMPSEG_USAGE? &#171; Charles Hooper&#39;s Oracle Notes</title>
		<link>http://jonathanlewis.wordpress.com/2008/02/13/statistics-problem/#comment-35850</link>
		<dc:creator><![CDATA[Duplicates when Querying V$TEMPSEG_USAGE? &#171; Charles Hooper&#39;s Oracle Notes]]></dc:creator>
		<pubDate>Mon, 22 Mar 2010 06:03:51 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=341#comment-35850</guid>
		<description><![CDATA[[...] hours, re-execute the query, and then check V$SQL_SHARED_CURSOR.  The delay is mentioned here and here, along with a hidden _optimizer_invalidation_period parameter that controls how long after [...]]]></description>
		<content:encoded><![CDATA[<p>[...] hours, re-execute the query, and then check V$SQL_SHARED_CURSOR.  The delay is mentioned here and here, along with a hidden _optimizer_invalidation_period parameter that controls how long after [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2008/02/13/statistics-problem/#comment-34820</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Mon, 09 Nov 2009 18:40:49 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=341#comment-34820</guid>
		<description><![CDATA[Nigel,

I think you&#039;re probably thinking of Chapter 5 of Cost Based Oracle - Fundamentals (the chapter that can be &lt;a href=&quot;http://www.apress.com/book/downloadfile/2410&quot; rel=&quot;nofollow&quot;&gt;&lt;b&gt;&lt;i&gt;downloaded as a free pdf file from Apress&lt;/i&gt;&lt;/b&gt;&lt;/a&gt;) where I suggest that we could &quot;hi-jack&quot; the &lt;em&gt;&lt;strong&gt;sys_op_countchg()&lt;/strong&gt;&lt;/em&gt; function used by Oracle to calculate the &lt;em&gt;&lt;strong&gt;clustering_factor&lt;/strong&gt;&lt;/em&gt; of an index.

You&#039;re probably correct to suggest that I could have made some comments about the function being undocumented and that my suggestion to trace the &lt;em&gt;&lt;strong&gt;gather_index_stats()&lt;/strong&gt;&lt;/em&gt; call should be repeated on every upgrade of Oracle to ensure that the mechanism was still appropriate.

In fact, as &lt;a href=&quot;http://www.worldsgreatestbusinessmind.com/20081221-Richard-Foote-create.html&amp;WT.mc_id=WGB&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;&lt;strong&gt;Richard Foote&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt; points out in one of the comments to his &lt;a href=&quot;http://richardfoote.wordpress.com/2009/10/16/oracle-openworld-day-5-hightlights/#comments&quot; rel=&quot;nofollow&quot;&gt;&lt;em&gt;&lt;strong&gt;postings on Oracle Open World 2009&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;, this may be particularly significant in some future (12+) version of Oracle because the Optimizer Group is looking at better ways of calculating the &lt;em&gt;&lt;strong&gt;clustering_factor&lt;/strong&gt;&lt;/em&gt; (and may, apparently, do something that looks remarkably similar to the suggestion I voiced in the book).
]]></description>
		<content:encoded><![CDATA[<p>Nigel,</p>
<p>I think you&#8217;re probably thinking of Chapter 5 of Cost Based Oracle &#8211; Fundamentals (the chapter that can be <a href="http://www.apress.com/book/downloadfile/2410" rel="nofollow"><b><i>downloaded as a free pdf file from Apress</i></b></a>) where I suggest that we could &#8220;hi-jack&#8221; the <em><strong>sys_op_countchg()</strong></em> function used by Oracle to calculate the <em><strong>clustering_factor</strong></em> of an index.</p>
<p>You&#8217;re probably correct to suggest that I could have made some comments about the function being undocumented and that my suggestion to trace the <em><strong>gather_index_stats()</strong></em> call should be repeated on every upgrade of Oracle to ensure that the mechanism was still appropriate.</p>
<p>In fact, as <a href="http://www.worldsgreatestbusinessmind.com/20081221-Richard-Foote-create.html&amp;WT.mc_id=WGB" rel="nofollow"><em><strong>Richard Foote</strong></em></a> points out in one of the comments to his <a href="http://richardfoote.wordpress.com/2009/10/16/oracle-openworld-day-5-hightlights/#comments" rel="nofollow"><em><strong>postings on Oracle Open World 2009</strong></em></a>, this may be particularly significant in some future (12+) version of Oracle because the Optimizer Group is looking at better ways of calculating the <em><strong>clustering_factor</strong></em> (and may, apparently, do something that looks remarkably similar to the suggestion I voiced in the book).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nigel</title>
		<link>http://jonathanlewis.wordpress.com/2008/02/13/statistics-problem/#comment-34816</link>
		<dc:creator><![CDATA[Nigel]]></dc:creator>
		<pubDate>Mon, 09 Nov 2009 13:21:25 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=341#comment-34816</guid>
		<description><![CDATA[sys_op_countchg()

A quick search on MetaLink shows precious little (practically nothing) about sys_op_countchg() - so, is it wise to promote its usage? Is it something that looks good, but could go nasty in a next release/patchset?]]></description>
		<content:encoded><![CDATA[<p>sys_op_countchg()</p>
<p>A quick search on MetaLink shows precious little (practically nothing) about sys_op_countchg() &#8211; so, is it wise to promote its usage? Is it something that looks good, but could go nasty in a next release/patchset?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
