<?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; pt2</title>
	<atom:link href="http://jonathanlewis.wordpress.com/join-ordering-pt2/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Wed, 19 Jun 2013 18:51:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: ANTONYRAJ</title>
		<link>http://jonathanlewis.wordpress.com/join-ordering-pt2/#comment-39643</link>
		<dc:creator><![CDATA[ANTONYRAJ]]></dc:creator>
		<pubDate>Mon, 21 Feb 2011 18:53:13 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/join-ordering-pt2/#comment-39643</guid>
		<description><![CDATA[Hi Jonathan,
It&#039;s an excellent explanation.PeopleSoft application has been using sub queries more often in it&#039;s application and recommended to set &quot;_unnest_subquery&quot;=false stating poor performance as reason when it&#039;s set to a default value i.e.True from 9i onwards.

The following SQL is running for 9 hrs using Filter optimization.The cardinality estimates are very low.
Can you explain why it&#039;s taking such a long time with Filter?
[sourcecode gutter=&quot;false&quot;]
UPDATE PS_LM_PERSON_EFFDT SET LM_PER_ORG_EMP = &#039;Y&#039;
WHERE EXISTS
( SELECT LM_PER_ORG FROM PS_LM_STG_PRS_JOB J , PS_LM_STG_PRS_ATT A
WHERE J.LM_PER_ORG = &#039;EMP&#039;
AND A.LM_PERSON_ID = PS_LM_PERSON_EFFDT.LM_PERSON_ID
AND J.LM_HR_EMPLID = A.LM_HR_EMPLID
AND J.EFFDT &gt;= PS_LM_PERSON_EFFDT.EFFDT
AND
J.PROCESS_INSTANCE = 87452
AND J.LM_EIP_CTRL_ID = :1)
 12   ;

Explained.

SQL&gt; @plan
Plan hash value: 2789679721

-----------------------------------------------------------------------------------------------------
&#124; Id  &#124; Operation                      &#124; Name               &#124; Rows  &#124; Bytes &#124; Cost (%CPU)&#124; Time     &#124;
-----------------------------------------------------------------------------------------------------
&#124;   0 &#124; UPDATE STATEMENT               &#124;                    &#124;     1 &#124;    15 &#124;   184M  (1)&#124;314:02:07 &#124;
&#124;   1 &#124;  UPDATE                        &#124; PS_LM_PERSON_EFFDT &#124;       &#124;       &#124;            &#124;          &#124;
&#124;*  2 &#124;   FILTER                       &#124;                    &#124;       &#124;       &#124;            &#124;          &#124;
&#124;   3 &#124;    TABLE ACCESS FULL           &#124; PS_LM_PERSON_EFFDT &#124; 33937 &#124;   497K&#124;    63   (2)&#124; 00:00:01 &#124;
&#124;   4 &#124;    NESTED LOOPS                &#124;                    &#124; 18128 &#124;   725K&#124;  6297   (1)&#124; 00:00:39 &#124;
&#124;*  5 &#124;     TABLE ACCESS BY INDEX ROWID&#124; PS_LM_STG_PRS_JOB  &#124;  6141 &#124;   173K&#124;     4   (0)&#124; 00:00:01 &#124;
&#124;*  6 &#124;      INDEX RANGE SCAN          &#124; PS_LM_STG_PRS_JOB  &#124;     1 &#124;       &#124;     3   (0)&#124; 00:00:01 &#124;
&#124;*  7 &#124;     INDEX RANGE SCAN           &#124; PSCLM_STG_PRS_ATT  &#124;     3 &#124;    36 &#124;     2   (0)&#124; 00:00:01 &#124;
-----------------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - filter( EXISTS (SELECT 0 FROM &quot;PS_LM_STG_PRS_ATT&quot; &quot;A&quot;,&quot;PS_LM_STG_PRS_JOB&quot; &quot;J&quot; WHERE
              SYS_OP_DESCEND(&quot;EFFDT&quot;)=:B2 AND
              &quot;J&quot;.&quot;LM_EIP_CTRL_ID&quot;=TO_NUMBER(:1) AND &quot;A&quot;.&quot;LM_PERSON_ID&quot;=:B3 AND
              &quot;J&quot;.&quot;LM_HR_EMPLID&quot;=&quot;A&quot;.&quot;LM_HR_EMPLID&quot;))
   5 - filter(&quot;J&quot;.&quot;LM_PER_ORG&quot;=&#039;EMP&#039;)
   6 - access(&quot;J&quot;.&quot;PROCESS_INSTANCE&quot;=87452 AND &quot;J&quot;.&quot;LM_EIP_CTRL_ID&quot;=TO_NUMBER(:1) AND
              SYS_OP_DESCEND(&quot;EFFDT&quot;)=:B1 AND
              &quot;J&quot;.&quot;LM_EIP_CTRL_ID&quot;=TO_NUMBER(:1))
   7 - access(&quot;J&quot;.&quot;LM_HR_EMPLID&quot;=&quot;A&quot;.&quot;LM_HR_EMPLID&quot; AND &quot;A&quot;.&quot;LM_PERSON_ID&quot;=:B1)
[/sourcecode]
Thanks]]></description>
		<content:encoded><![CDATA[<p>Hi Jonathan,<br />
It&#8217;s an excellent explanation.PeopleSoft application has been using sub queries more often in it&#8217;s application and recommended to set &#8220;_unnest_subquery&#8221;=false stating poor performance as reason when it&#8217;s set to a default value i.e.True from 9i onwards.</p>
<p>The following SQL is running for 9 hrs using Filter optimization.The cardinality estimates are very low.<br />
Can you explain why it&#8217;s taking such a long time with Filter?</p>
<pre class="brush: plain; gutter: false; title: ; notranslate">
UPDATE PS_LM_PERSON_EFFDT SET LM_PER_ORG_EMP = 'Y'
WHERE EXISTS
( SELECT LM_PER_ORG FROM PS_LM_STG_PRS_JOB J , PS_LM_STG_PRS_ATT A
WHERE J.LM_PER_ORG = 'EMP'
AND A.LM_PERSON_ID = PS_LM_PERSON_EFFDT.LM_PERSON_ID
AND J.LM_HR_EMPLID = A.LM_HR_EMPLID
AND J.EFFDT &gt;= PS_LM_PERSON_EFFDT.EFFDT
AND
J.PROCESS_INSTANCE = 87452
AND J.LM_EIP_CTRL_ID = :1)
 12   ;

Explained.

SQL&gt; @plan
Plan hash value: 2789679721

-----------------------------------------------------------------------------------------------------
| Id  | Operation                      | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
-----------------------------------------------------------------------------------------------------
|   0 | UPDATE STATEMENT               |                    |     1 |    15 |   184M  (1)|314:02:07 |
|   1 |  UPDATE                        | PS_LM_PERSON_EFFDT |       |       |            |          |
|*  2 |   FILTER                       |                    |       |       |            |          |
|   3 |    TABLE ACCESS FULL           | PS_LM_PERSON_EFFDT | 33937 |   497K|    63   (2)| 00:00:01 |
|   4 |    NESTED LOOPS                |                    | 18128 |   725K|  6297   (1)| 00:00:39 |
|*  5 |     TABLE ACCESS BY INDEX ROWID| PS_LM_STG_PRS_JOB  |  6141 |   173K|     4   (0)| 00:00:01 |
|*  6 |      INDEX RANGE SCAN          | PS_LM_STG_PRS_JOB  |     1 |       |     3   (0)| 00:00:01 |
|*  7 |     INDEX RANGE SCAN           | PSCLM_STG_PRS_ATT  |     3 |    36 |     2   (0)| 00:00:01 |
-----------------------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - filter( EXISTS (SELECT 0 FROM &quot;PS_LM_STG_PRS_ATT&quot; &quot;A&quot;,&quot;PS_LM_STG_PRS_JOB&quot; &quot;J&quot; WHERE
              SYS_OP_DESCEND(&quot;EFFDT&quot;)=:B2 AND
              &quot;J&quot;.&quot;LM_EIP_CTRL_ID&quot;=TO_NUMBER(:1) AND &quot;A&quot;.&quot;LM_PERSON_ID&quot;=:B3 AND
              &quot;J&quot;.&quot;LM_HR_EMPLID&quot;=&quot;A&quot;.&quot;LM_HR_EMPLID&quot;))
   5 - filter(&quot;J&quot;.&quot;LM_PER_ORG&quot;='EMP')
   6 - access(&quot;J&quot;.&quot;PROCESS_INSTANCE&quot;=87452 AND &quot;J&quot;.&quot;LM_EIP_CTRL_ID&quot;=TO_NUMBER(:1) AND
              SYS_OP_DESCEND(&quot;EFFDT&quot;)=:B1 AND
              &quot;J&quot;.&quot;LM_EIP_CTRL_ID&quot;=TO_NUMBER(:1))
   7 - access(&quot;J&quot;.&quot;LM_HR_EMPLID&quot;=&quot;A&quot;.&quot;LM_HR_EMPLID&quot; AND &quot;A&quot;.&quot;LM_PERSON_ID&quot;=:B1)
</pre>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amir Riaz</title>
		<link>http://jonathanlewis.wordpress.com/join-ordering-pt2/#comment-37633</link>
		<dc:creator><![CDATA[Amir Riaz]]></dc:creator>
		<pubDate>Sat, 30 Oct 2010 17:51:28 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/join-ordering-pt2/#comment-37633</guid>
		<description><![CDATA[remarkable...]]></description>
		<content:encoded><![CDATA[<p>remarkable&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alberto Dell'Era</title>
		<link>http://jonathanlewis.wordpress.com/join-ordering-pt2/#comment-3623</link>
		<dc:creator><![CDATA[Alberto Dell'Era]]></dc:creator>
		<pubDate>Sat, 24 Feb 2007 22:58:30 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/join-ordering-pt2/#comment-3623</guid>
		<description><![CDATA[It would be terrific if you could transform this page into a section of a book of yours.

The style is perfect, a catalog of quick-to-read definitions each illustrated with a clear and simple example (the simplest possible) ... my preferred format. 

Obviously the topic is very interesting to me as well.]]></description>
		<content:encoded><![CDATA[<p>It would be terrific if you could transform this page into a section of a book of yours.</p>
<p>The style is perfect, a catalog of quick-to-read definitions each illustrated with a clear and simple example (the simplest possible) &#8230; my preferred format. </p>
<p>Obviously the topic is very interesting to me as well.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
