<?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: Join Ordering &#8211; 1</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Sun, 19 May 2013 12:40:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Web Presentation &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-3772</link>
		<dc:creator><![CDATA[Web Presentation &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Mon, 05 Mar 2007 23:45:51 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-3772</guid>
		<description><![CDATA[[...] The general structure of the query used was the one I first introduced in the blog item about Join Orders. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] The general structure of the query used was the one I first introduced in the blog item about Join Orders. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-3169</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Tue, 06 Feb 2007 19:16:54 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-3169</guid>
		<description><![CDATA[Avanish, I wasn&#039;t specifically focusing on what the optimizer can do as on what the best strategy might be. In this 4-table query, there is a join strategy which Oracle&#039;s optimizer won&#039;t even consider (even though it might be the best one) because it it not a &#039;left-deep&#039; strategy.

I was interested in your comment about the semi-join and the unnesting being different trees. In some tests that I&#039;ve forced onto the optimizer, I got all 24 possible join orders for a query of this type, and some of them included the simple unnesting (in-line view) aproach AND the semi-join approach in the same join order. So I had concluded that there was no &#039;separate space&#039; to distinguish between the two - am I definitely wrong ?]]></description>
		<content:encoded><![CDATA[<p>Avanish, I wasn&#8217;t specifically focusing on what the optimizer can do as on what the best strategy might be. In this 4-table query, there is a join strategy which Oracle&#8217;s optimizer won&#8217;t even consider (even though it might be the best one) because it it not a &#8216;left-deep&#8217; strategy.</p>
<p>I was interested in your comment about the semi-join and the unnesting being different trees. In some tests that I&#8217;ve forced onto the optimizer, I got all 24 possible join orders for a query of this type, and some of them included the simple unnesting (in-line view) aproach AND the semi-join approach in the same join order. So I had concluded that there was no &#8216;separate space&#8217; to distinguish between the two &#8211; am I definitely wrong ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Avanish</title>
		<link>http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-3144</link>
		<dc:creator><![CDATA[Avanish]]></dc:creator>
		<pubDate>Mon, 05 Feb 2007 11:43:27 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-3144</guid>
		<description><![CDATA[JL, I think if both the subqs are un-nested then we have 4! possible methods. If the subqs are not un-nested then, we have 2! and then the evaluation of the subq. Also if the rules for semi-join applies, then that is another tree.

On the whole, it depends on new initial join orders also.

So unless we get a 10053 dump, i dont think we can give a number.

by the way, apologies for using JL!!!!!!!!!!!!!!!]]></description>
		<content:encoded><![CDATA[<p>JL, I think if both the subqs are un-nested then we have 4! possible methods. If the subqs are not un-nested then, we have 2! and then the evaluation of the subq. Also if the rules for semi-join applies, then that is another tree.</p>
<p>On the whole, it depends on new initial join orders also.</p>
<p>So unless we get a 10053 dump, i dont think we can give a number.</p>
<p>by the way, apologies for using JL!!!!!!!!!!!!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mikito Harakiri</title>
		<link>http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-2310</link>
		<dc:creator><![CDATA[Mikito Harakiri]]></dc:creator>
		<pubDate>Wed, 24 Jan 2007 18:51:05 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-2310</guid>
		<description><![CDATA[Or yeah, that was a typo.]]></description>
		<content:encoded><![CDATA[<p>Or yeah, that was a typo.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mikito Harakiri</title>
		<link>http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-2309</link>
		<dc:creator><![CDATA[Mikito Harakiri]]></dc:creator>
		<pubDate>Wed, 24 Jan 2007 18:50:14 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-2309</guid>
		<description><![CDATA[Catalan(3) = 5, which is a coincidence.]]></description>
		<content:encoded><![CDATA[<p>Catalan(3) = 5, which is a coincidence.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wolfgang Breitling</title>
		<link>http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-2308</link>
		<dc:creator><![CDATA[Wolfgang Breitling]]></dc:creator>
		<pubDate>Wed, 24 Jan 2007 18:47:16 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-2308</guid>
		<description><![CDATA[Mikito, what am I missing? Isn&#039;t 5*4! the same as 5! (= 1*2*3*4*5)? Or was that a typo and you meant &quot;there are 5*4! plans but the optimizer looks into only 4! of them&quot;]]></description>
		<content:encoded><![CDATA[<p>Mikito, what am I missing? Isn&#8217;t 5*4! the same as 5! (= 1*2*3*4*5)? Or was that a typo and you meant &#8220;there are 5*4! plans but the optimizer looks into only 4! of them&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mikito Harakiri</title>
		<link>http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-2301</link>
		<dc:creator><![CDATA[Mikito Harakiri]]></dc:creator>
		<pubDate>Wed, 24 Jan 2007 17:41:11 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-2301</guid>
		<description><![CDATA[That&#039;s right, how the supposed answer 14 can be less than 4! ? Therefore, for unnested and merged plans there are 5*4! plans but the optimizer looks into only 5! of them. Some plans which are not unnested, howewer, are equivalent to bushy plans -- this is one of the reason why unnesting&amp;merging can potentially miss a good plan.]]></description>
		<content:encoded><![CDATA[<p>That&#8217;s right, how the supposed answer 14 can be less than 4! ? Therefore, for unnested and merged plans there are 5*4! plans but the optimizer looks into only 5! of them. Some plans which are not unnested, howewer, are equivalent to bushy plans &#8212; this is one of the reason why unnesting&amp;merging can potentially miss a good plan.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-2268</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Wed, 24 Jan 2007 10:58:22 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-2268</guid>
		<description><![CDATA[Mikito, I was planning to be rather more informal; however, since you&#039;ve mentioned Catalan numbers, why isn&#039;t the starting value (Catalan(3) * 4!). Catalan(3) as the number of arrangements of a tree with 4 &quot;leaf points&quot;, and 4! as the possible permutations of the tables around the &quot;leaf points&quot;. Am I missing something like a commutativity assumption that changes the formula ?

Antonio - there shouldn&#039;t be any performance difference.]]></description>
		<content:encoded><![CDATA[<p>Mikito, I was planning to be rather more informal; however, since you&#8217;ve mentioned Catalan numbers, why isn&#8217;t the starting value (Catalan(3) * 4!). Catalan(3) as the number of arrangements of a tree with 4 &#8220;leaf points&#8221;, and 4! as the possible permutations of the tables around the &#8220;leaf points&#8221;. Am I missing something like a commutativity assumption that changes the formula ?</p>
<p>Antonio &#8211; there shouldn&#8217;t be any performance difference.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antonio</title>
		<link>http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-2246</link>
		<dc:creator><![CDATA[Antonio]]></dc:creator>
		<pubDate>Wed, 24 Jan 2007 08:13:38 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-2246</guid>
		<description><![CDATA[@Jonathan

A question on the exists sub-query.

In the sub-query, you write something like &quot;select column&quot;, I&#039;m used to write something like &quot;select *&quot;.

I saw other forms: &quot;select 1&quot; and even &quot;select NULL&quot; (this one in Oracle documentation).

Are there any performance difference?

Thank you.]]></description>
		<content:encoded><![CDATA[<p>@Jonathan</p>
<p>A question on the exists sub-query.</p>
<p>In the sub-query, you write something like &#8220;select column&#8221;, I&#8217;m used to write something like &#8220;select *&#8221;.</p>
<p>I saw other forms: &#8220;select 1&#8243; and even &#8220;select NULL&#8221; (this one in Oracle documentation).</p>
<p>Are there any performance difference?</p>
<p>Thank you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mikito Harakiri</title>
		<link>http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-2233</link>
		<dc:creator><![CDATA[Mikito Harakiri]]></dc:creator>
		<pubDate>Wed, 24 Jan 2007 03:30:42 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2007/01/24/join-ordering-1/#comment-2233</guid>
		<description><![CDATA[Assuming that all the subqueries are unnested, and that tuple iteration execution semantics is not really different from nested loop, we should have 14 different executions (4th Catalan number). So the answer is 14 minus the number of join orders appearing in the 10053 trace.]]></description>
		<content:encoded><![CDATA[<p>Assuming that all the subqueries are unnested, and that tuple iteration execution semantics is not really different from nested loop, we should have 14 different executions (4th Catalan number). So the answer is 14 minus the number of join orders appearing in the 10053 trace.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
