<?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/"
		>
<channel>
	<title>Comments on: Join Elimination</title>
	<atom:link href="http://antognini.ch/2010/01/join-elimination/feed/" rel="self" type="application/rss+xml" />
	<link>http://antognini.ch/2010/01/join-elimination/</link>
	<description></description>
	<lastBuildDate>Fri, 27 Jan 2012 07:31:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Common errors seen when using OUTER JOIN: Join Against a Constant &#171; So Many Oracle Manuals, So Little Time</title>
		<link>http://antognini.ch/2010/01/join-elimination/comment-page-1/#comment-18834</link>
		<dc:creator>Common errors seen when using OUTER JOIN: Join Against a Constant &#171; So Many Oracle Manuals, So Little Time</dc:creator>
		<pubDate>Sun, 06 Mar 2011 01:19:33 +0000</pubDate>
		<guid isPermaLink="false">http://antognini.ch/?p=826#comment-18834</guid>
		<description>[...] first converted the outer join into a join (and then eliminated two tables from the query using the join elimination technique.) Tom explains: Whenever you see a construct such [...]</description>
		<content:encoded><![CDATA[<p>[...] first converted the outer join into a join (and then eliminated two tables from the query using the join elimination technique.) Tom explains: Whenever you see a construct such [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oracle 11.2.0.1: баг типа PERFORMANCE &#8211; filtering join elimination &#171; Oracle mechanics</title>
		<link>http://antognini.ch/2010/01/join-elimination/comment-page-1/#comment-12387</link>
		<dc:creator>Oracle 11.2.0.1: баг типа PERFORMANCE &#8211; filtering join elimination &#171; Oracle mechanics</dc:creator>
		<pubDate>Fri, 29 Oct 2010 16:06:41 +0000</pubDate>
		<guid isPermaLink="false">http://antognini.ch/?p=826#comment-12387</guid>
		<description>[...] операции исключения &#171;избыточного&#187; соединения (join elimination), а точнее в нашем случае FJE (Filtering Join Elimination &#8211; [...]</description>
		<content:encoded><![CDATA[<p>[...] операции исключения &laquo;избыточного&raquo; соединения (join elimination), а точнее в нашем случае FJE (Filtering Join Elimination &#8211; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Donatello Settembrino</title>
		<link>http://antognini.ch/2010/01/join-elimination/comment-page-1/#comment-8065</link>
		<dc:creator>Donatello Settembrino</dc:creator>
		<pubDate>Mon, 01 Mar 2010 07:19:54 +0000</pubDate>
		<guid isPermaLink="false">http://antognini.ch/?p=826#comment-8065</guid>
		<description>Yes, it was just what I asked and confirm that I wanted

Thanks

Donatello</description>
		<content:encoded><![CDATA[<p>Yes, it was just what I asked and confirm that I wanted</p>
<p>Thanks</p>
<p>Donatello</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian Antognini</title>
		<link>http://antognini.ch/2010/01/join-elimination/comment-page-1/#comment-8045</link>
		<dc:creator>Christian Antognini</dc:creator>
		<pubDate>Sun, 28 Feb 2010 15:24:50 +0000</pubDate>
		<guid isPermaLink="false">http://antognini.ch/?p=826#comment-8045</guid>
		<description>Ciao Donatello

&gt; why do not you want to apply the constraints, I believe the following
&gt; solution (PK and FK mode RELY), is the only viable, right?

Sorry, but I&#039;m not sure to understand what do you mean. Hence, if I missed you question, let me know!

In the case do you want to know how to take advantage of join elimination in case of missing (enforced) constraints, yes, AFAIK the trick with the disabled constraints marked with RELY is the only viable option. 

HTH
Chris</description>
		<content:encoded><![CDATA[<p>Ciao Donatello</p>
<p>> why do not you want to apply the constraints, I believe the following<br />
> solution (PK and FK mode RELY), is the only viable, right?</p>
<p>Sorry, but I&#8217;m not sure to understand what do you mean. Hence, if I missed you question, let me know!</p>
<p>In the case do you want to know how to take advantage of join elimination in case of missing (enforced) constraints, yes, AFAIK the trick with the disabled constraints marked with RELY is the only viable option. </p>
<p>HTH<br />
Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Donatello Settembrino</title>
		<link>http://antognini.ch/2010/01/join-elimination/comment-page-1/#comment-7573</link>
		<dc:creator>Donatello Settembrino</dc:creator>
		<pubDate>Fri, 05 Feb 2010 14:17:11 +0000</pubDate>
		<guid isPermaLink="false">http://antognini.ch/?p=826#comment-7573</guid>
		<description>Ciao Christian,
but if the tables are without PK and FK
why do not you want to apply the constraints, I believe the following
solution (PK and FK mode RELY), is the only viable, right?

&lt;pre&gt;
SQL&gt; CREATE TABLE t1 (
  2      id NUMBER NOT NULL,
  3      n NUMBER,
  4      pad VARCHAR2(4000)
  5  );

SQL&gt; insert into t1
  2      select rownum as id, rownum+1 as n, dbms_random.string(&#039;Z&#039;, 1000) as pad 
  3      from dual 
  4      connect by level &lt;= 100000;

SQL&gt; CREATE TABLE t2 (
  2        id NUMBER NOT NULL,
  3        t1_id NUMBER NOT NULL,
  4        n NUMBER,
  5        pad VARCHAR2(4000)
  6  );

SQL&gt; insert into t2
  2      select rownum as id, rownum as t1_id, rownum+1 as n, dbms_random.string(&#039;Z&#039;, 1000) as pad 
  3      from dual 
  4      connect by level &lt;= 100000;

SQL&gt; CREATE VIEW v AS
  2       SELECT t1.id AS t1_id, t1.n AS t1_n, t2.id AS t2_id, t2.n AS t2_n
  3       FROM t1, t2
  4       WHERE t1.id = t2.t1_id;


SQL&gt; ALTER TABLE t1 ADD CONSTRAINT t1_pk
  2      PRIMARY KEY (id)  
  3      RELY DISABLE NOVALIDATE;


SQL&gt; ALTER TABLE t2 ADD CONSTRAINT t2_t1_fk
  2      FOREIGN KEY (t1_id) REFERENCES t1  
  3      RELY DISABLE NOVALIDATE;

SQL&gt; EXPLAIN PLAN FOR SELECT t2_id, t2_n FROM v;


SQL&gt; SELECT * FROM table(dbms_xplan.display(NULL,NULL,&#039;all&#039;));


---------------------------------------------------------------
&#124; Id  &#124; Operation         &#124; Name &#124; Rows  &#124; Bytes &#124; Cost (%CPU)&#124;
---------------------------------------------------------------
&#124;   0 &#124; SELECT STATEMENT  &#124;      &#124;   100K&#124;  1464K&#124;  2522   (1)&#124;
&#124;   1 &#124;  TABLE ACCESS FULL&#124; T2   &#124;   100K&#124;  1464K&#124;  2522   (1)&#124;
---------------------------------------------------------------

&lt;/pre&gt;

thanks
Donatello</description>
		<content:encoded><![CDATA[<p>Ciao Christian,<br />
but if the tables are without PK and FK<br />
why do not you want to apply the constraints, I believe the following<br />
solution (PK and FK mode RELY), is the only viable, right?</p>
<p><pre>
SQL&gt; CREATE TABLE t1 (
  2      id NUMBER NOT NULL,
  3      n NUMBER,
  4      pad VARCHAR2(4000)
  5  );

SQL&gt; insert into t1
  2      select rownum as id, rownum+1 as n, dbms_random.string(&#039;Z&#039;, 1000) as pad 
  3      from dual 
  4      connect by level &lt;= 100000;

SQL&gt; CREATE TABLE t2 (
  2        id NUMBER NOT NULL,
  3        t1_id NUMBER NOT NULL,
  4        n NUMBER,
  5        pad VARCHAR2(4000)
  6  );

SQL&gt; insert into t2
  2      select rownum as id, rownum as t1_id, rownum+1 as n, dbms_random.string(&#039;Z&#039;, 1000) as pad 
  3      from dual 
  4      connect by level &lt;= 100000;

SQL&gt; CREATE VIEW v AS
  2       SELECT t1.id AS t1_id, t1.n AS t1_n, t2.id AS t2_id, t2.n AS t2_n
  3       FROM t1, t2
  4       WHERE t1.id = t2.t1_id;

SQL&gt; ALTER TABLE t1 ADD CONSTRAINT t1_pk
  2      PRIMARY KEY (id)  
  3      RELY DISABLE NOVALIDATE;

SQL&gt; ALTER TABLE t2 ADD CONSTRAINT t2_t1_fk
  2      FOREIGN KEY (t1_id) REFERENCES t1  
  3      RELY DISABLE NOVALIDATE;

SQL&gt; EXPLAIN PLAN FOR SELECT t2_id, t2_n FROM v;

SQL&gt; SELECT * FROM table(dbms_xplan.display(NULL,NULL,&#039;all&#039;));

---------------------------------------------------------------
| Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)|
---------------------------------------------------------------
|   0 | SELECT STATEMENT  |      |   100K|  1464K|  2522   (1)|
|   1 |  TABLE ACCESS FULL| T2   |   100K|  1464K|  2522   (1)|
---------------------------------------------------------------

</pre></p>
<p>thanks<br />
Donatello</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blogroll Report 08/01/2009 – 15/01/2010 &#171; Coskan&#8217;s Approach to Oracle</title>
		<link>http://antognini.ch/2010/01/join-elimination/comment-page-1/#comment-7490</link>
		<dc:creator>Blogroll Report 08/01/2009 – 15/01/2010 &#171; Coskan&#8217;s Approach to Oracle</dc:creator>
		<pubDate>Tue, 02 Feb 2010 18:58:11 +0000</pubDate>
		<guid isPermaLink="false">http://antognini.ch/?p=826#comment-7490</guid>
		<description>[...] 12-How does Join Elimination works in 11G for unnecessary self joins? Christian Antognini-Join Elimination [...]</description>
		<content:encoded><![CDATA[<p>[...] 12-How does Join Elimination works in 11G for unnecessary self joins? Christian Antognini-Join Elimination [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian Antognini</title>
		<link>http://antognini.ch/2010/01/join-elimination/comment-page-1/#comment-7313</link>
		<dc:creator>Christian Antognini</dc:creator>
		<pubDate>Mon, 25 Jan 2010 16:45:10 +0000</pubDate>
		<guid isPermaLink="false">http://antognini.ch/?p=826#comment-7313</guid>
		<description>Hi

@Sake

&gt; However, I’m curious, in what kind of real world situation when the “unnecessary” self-joins will occur ?

I do not have a real case to share with you. But, let&#039;s face it, lot of databases run &quot;strange&quot; SQL statements ;-)


@Gary

&gt; The optimized selects assume the constraint is in force and give a one row result based solely on t2.

That should not happen. IMO this is a bug.


@Dongkyu

First of all, thank you for the detailed feedback! BTW, I do not consider case 7 a &quot;join elimination&quot; technique. And that even though a join is avoided. Otherwise we should consider also query rewrite techinques being part of &quot;join elimination&quot;. Anyway, it&#039;s not really important ;-)


@Timur

&gt; the second case is an enhancement introduced in a one-off patch #7679164 for most *nix

Thanks for the information. I didn&#039;t know it...


Cheers,
Chris</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>@Sake</p>
<p>> However, I’m curious, in what kind of real world situation when the “unnecessary” self-joins will occur ?</p>
<p>I do not have a real case to share with you. But, let&#8217;s face it, lot of databases run &#8220;strange&#8221; SQL statements ;-)</p>
<p>@Gary</p>
<p>> The optimized selects assume the constraint is in force and give a one row result based solely on t2.</p>
<p>That should not happen. IMO this is a bug.</p>
<p>@Dongkyu</p>
<p>First of all, thank you for the detailed feedback! BTW, I do not consider case 7 a &#8220;join elimination&#8221; technique. And that even though a join is avoided. Otherwise we should consider also query rewrite techinques being part of &#8220;join elimination&#8221;. Anyway, it&#8217;s not really important ;-)</p>
<p>@Timur</p>
<p>> the second case is an enhancement introduced in a one-off patch #7679164 for most *nix</p>
<p>Thanks for the information. I didn&#8217;t know it&#8230;</p>
<p>Cheers,<br />
Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Log Buffer #175: a Carnival of the Vanities for DBAs &#124; The Pythian Blog</title>
		<link>http://antognini.ch/2010/01/join-elimination/comment-page-1/#comment-7137</link>
		<dc:creator>Log Buffer #175: a Carnival of the Vanities for DBAs &#124; The Pythian Blog</dc:creator>
		<pubDate>Fri, 15 Jan 2010 18:34:11 +0000</pubDate>
		<guid isPermaLink="false">http://antognini.ch/?p=826#comment-7137</guid>
		<description>[...] are still Striving for Optimal Performance, like Christian Antognini is. Here&#8217;s his item on join elimination, which he introduces thus: &#8220;In some specific situations the query optimizer is able to [...]</description>
		<content:encoded><![CDATA[<p>[...] are still Striving for Optimal Performance, like Christian Antognini is. Here&#8217;s his item on join elimination, which he introduces thus: &#8220;In some specific situations the query optimizer is able to [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://antognini.ch/2010/01/join-elimination/comment-page-1/#comment-7052</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Thu, 14 Jan 2010 23:11:26 +0000</pubDate>
		<guid isPermaLink="false">http://antognini.ch/?p=826#comment-7052</guid>
		<description>@sake. One real-world example for case 1 is where you use a view to join a parent and child and the view has columns from both tables. If, when the view is used, only columns from the child table are used the join to the parent can be omitted.</description>
		<content:encoded><![CDATA[<p>@sake. One real-world example for case 1 is where you use a view to join a parent and child and the view has columns from both tables. If, when the view is used, only columns from the child table are used the join to the parent can be omitted.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timur Akhmadeev</title>
		<link>http://antognini.ch/2010/01/join-elimination/comment-page-1/#comment-6979</link>
		<dc:creator>Timur Akhmadeev</dc:creator>
		<pubDate>Tue, 12 Jan 2010 07:57:23 +0000</pubDate>
		<guid isPermaLink="false">http://antognini.ch/?p=826#comment-6979</guid>
		<description>Hi Christian,

the second case is an enhancement introduced in a one-off patch #7679164 for most *nix, and is included in Win patch bundle #19</description>
		<content:encoded><![CDATA[<p>Hi Christian,</p>
<p>the second case is an enhancement introduced in a one-off patch #7679164 for most *nix, and is included in Win patch bundle #19</p>
]]></content:encoded>
	</item>
</channel>
</rss>

