<?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: dbms_xplan &#8211; again</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/</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: Mything 2 &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-40848</link>
		<dc:creator><![CDATA[Mything 2 &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Fri, 24 Jun 2011 17:53:08 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-40848</guid>
		<description><![CDATA[[...] it doesn&#8217;t &#8211; and there&#8217;s a clue about why not in the &#8220;Predicate Information&#8221;. To create this plan the optimizer would have to duplicate an existing predicate (c1 = 5) so that [...]]]></description>
		<content:encoded><![CDATA[<p>[...] it doesn&#8217;t &#8211; and there&#8217;s a clue about why not in the &#8220;Predicate Information&#8221;. To create this plan the optimizer would have to duplicate an existing predicate (c1 = 5) so that [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Join Surprise &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-38719</link>
		<dc:creator><![CDATA[Join Surprise &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Wed, 15 Dec 2010 20:56:36 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-38719</guid>
		<description><![CDATA[[...] of the plan is much lower as a consequence.. You&#8217;ll also notice that the predicate sections (always check the predicate section) are a little different &#8211; the order of evaluation has been [...]]]></description>
		<content:encoded><![CDATA[<p>[...] of the plan is much lower as a consequence.. You&#8217;ll also notice that the predicate sections (always check the predicate section) are a little different &#8211; the order of evaluation has been [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Buffer Sorts &#8211; 2 &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-36168</link>
		<dc:creator><![CDATA[Buffer Sorts &#8211; 2 &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Fri, 07 May 2010 08:50:32 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-36168</guid>
		<description><![CDATA[[...] The owner of the query is going to be using dbms_xplan, checking the estimated cardinalities and predicates, to check why Oracle came up with a Cartesian [...]]]></description>
		<content:encoded><![CDATA[<p>[...] The owner of the query is going to be using dbms_xplan, checking the estimated cardinalities and predicates, to check why Oracle came up with a Cartesian [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cursor Sharing 3 &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-36142</link>
		<dc:creator><![CDATA[Cursor Sharing 3 &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Mon, 03 May 2010 20:58:35 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-36142</guid>
		<description><![CDATA[[...] first response, of course, should be to tell me off for not showing the complete execution plan. Always genreate and look at the predicate sections which, in this case, also shows some [...]]]></description>
		<content:encoded><![CDATA[<p>[...] first response, of course, should be to tell me off for not showing the complete execution plan. Always genreate and look at the predicate sections which, in this case, also shows some [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Predicate (again) &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-36049</link>
		<dc:creator><![CDATA[Predicate (again) &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Thu, 15 Apr 2010 18:18:37 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-36049</guid>
		<description><![CDATA[[...] Lewis @ 6:17 pm UTC Apr 15,2010   I often make a fuss about making sure that people include the predicate section when looking at execution plans. Here&#8217;s another example demonstrating why it can be so [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Lewis @ 6:17 pm UTC Apr 15,2010   I often make a fuss about making sure that people include the predicate section when looking at execution plans. Here&#8217;s another example demonstrating why it can be so [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ignoring Hints &#8211; 2 &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-35472</link>
		<dc:creator><![CDATA[Ignoring Hints &#8211; 2 &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Thu, 11 Feb 2010 19:29:56 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-35472</guid>
		<description><![CDATA[[...] Have you spotted the critical clue ? It&#8217;s in the predicate sections. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Have you spotted the critical clue ? It&#8217;s in the predicate sections. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Predicate Problems &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-33671</link>
		<dc:creator><![CDATA[Predicate Problems &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Fri, 26 Jun 2009 13:33:59 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-33671</guid>
		<description><![CDATA[[...] &#8212; Jonathan Lewis @ 8:47 pm UTC Dec 3,2008   Whenever you look at an execution plan, you must look at the predicate section (introduced in 9i) before you start trying to work out what’s gone wrong. Here’s an example [...]]]></description>
		<content:encoded><![CDATA[<p>[...] &#8212; Jonathan Lewis @ 8:47 pm UTC Dec 3,2008   Whenever you look at an execution plan, you must look at the predicate section (introduced in 9i) before you start trying to work out what’s gone wrong. Here’s an example [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trouble-shooting &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-29015</link>
		<dc:creator><![CDATA[Trouble-shooting &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Mon, 14 Jan 2008 13:32:58 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-29015</guid>
		<description><![CDATA[[...] so we are a little deprived of clues. The execution plan should always be a proper report from dbms_xplan, showing the access_predicates and filter_predicates. In this case, we may find that (for reasons [...]]]></description>
		<content:encoded><![CDATA[<p>[...] so we are a little deprived of clues. The execution plan should always be a proper report from dbms_xplan, showing the access_predicates and filter_predicates. In this case, we may find that (for reasons [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ganesh</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-22167</link>
		<dc:creator><![CDATA[Ganesh]]></dc:creator>
		<pubDate>Mon, 08 Oct 2007 19:29:46 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-22167</guid>
		<description><![CDATA[Thanks.

Ganesh]]></description>
		<content:encoded><![CDATA[<p>Thanks.</p>
<p>Ganesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-21990</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Fri, 05 Oct 2007 09:10:44 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/12/22/dbms_xplan-again/#comment-21990</guid>
		<description><![CDATA[Ganesh,  I see Jeff Kemp has supplied the answer.  The position of rows in a table is not predicatable, and any time you want an ordered output, you must be able to supply an &quot;order by&quot; clause.

I&#039;d go one step further than Jeff, possibly:
[sourcecode language=&quot;sql&quot;]
create table jpl_plan as
select 	&#039;Some Label Text&#039;	tag, 	rownum			rn, 	plan_table_output 	plan_line 
from 	table(dbms_xplan.display_cursor(&#039;9tz4qu4rj9rdp&#039;))
where	rownum = 0
;
[/sourcecode]
This happens to use a particular cursor that I know is in memory to give me the table structure.
Then I can use Jeff&#039;s &quot;insert as select&quot; with a piece of text to label every plan as I create it:
[sourcecode language=&quot;sql&quot;]
insert into jpl_plan select &#039;LABEL1&#039;, rn, plan_table_output from ...

commit;

select	plan_table_output
from	jpl_plan
where	tag = &#039;LABEL1&#039;
order by	rn
;
[/sourcecode]


]]></description>
		<content:encoded><![CDATA[<p>Ganesh,  I see Jeff Kemp has supplied the answer.  The position of rows in a table is not predicatable, and any time you want an ordered output, you must be able to supply an &#8220;order by&#8221; clause.</p>
<p>I&#8217;d go one step further than Jeff, possibly:</p>
<pre class="brush: sql; title: ; notranslate">
create table jpl_plan as
select 	'Some Label Text'	tag, 	rownum			rn, 	plan_table_output 	plan_line 
from 	table(dbms_xplan.display_cursor('9tz4qu4rj9rdp'))
where	rownum = 0
;
</pre>
<p>This happens to use a particular cursor that I know is in memory to give me the table structure.<br />
Then I can use Jeff&#8217;s &#8220;insert as select&#8221; with a piece of text to label every plan as I create it:</p>
<pre class="brush: sql; title: ; notranslate">
insert into jpl_plan select 'LABEL1', rn, plan_table_output from ...

commit;

select	plan_table_output
from	jpl_plan
where	tag = 'LABEL1'
order by	rn
;
</pre>
]]></content:encoded>
	</item>
</channel>
</rss>
