<?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: Ignoring Hints</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2010/05/19/ignoring-hints-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2010/05/19/ignoring-hints-3/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Mon, 20 May 2013 17:10:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: jayasankar</title>
		<link>http://jonathanlewis.wordpress.com/2010/05/19/ignoring-hints-3/#comment-50532</link>
		<dc:creator><![CDATA[jayasankar]]></dc:creator>
		<pubDate>Thu, 27 Sep 2012 09:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3764#comment-50532</guid>
		<description><![CDATA[Thanks for your update. Yes for single table hints will be forwarded to remote site like you said.]]></description>
		<content:encoded><![CDATA[<p>Thanks for your update. Yes for single table hints will be forwarded to remote site like you said.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2010/05/19/ignoring-hints-3/#comment-50531</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Thu, 27 Sep 2012 08:37:31 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3764#comment-50531</guid>
		<description><![CDATA[I&#039;ve not been able to find a method. I think that somewhere I&#039;ve published a note that if the &quot;remote SQL&quot; is for a single table then hints for that table will be forwarded, but if the remote SQL includes a join then the hints disappear.

A possible side effect of this &lt;i&gt;&lt;b&gt;that I haven&#039;t yet tested&lt;/b&gt;&lt;/i&gt; is that SQL Baselines involving remote joins may fail to stabilise the execution plan, because basically an SQL Baseline is a set of hints.  I&#039;ve tried copying the outline (dbms_xplan.display(null,null,&#039;outline&#039;)) hints back into a fully remote SQL statement - like your select from a view - and found that even the &quot;guaranteed&quot; full set won&#039;t work.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve not been able to find a method. I think that somewhere I&#8217;ve published a note that if the &#8220;remote SQL&#8221; is for a single table then hints for that table will be forwarded, but if the remote SQL includes a join then the hints disappear.</p>
<p>A possible side effect of this <i><b>that I haven&#8217;t yet tested</b></i> is that SQL Baselines involving remote joins may fail to stabilise the execution plan, because basically an SQL Baseline is a set of hints.  I&#8217;ve tried copying the outline (dbms_xplan.display(null,null,&#8217;outline&#8217;)) hints back into a fully remote SQL statement &#8211; like your select from a view &#8211; and found that even the &#8220;guaranteed&#8221; full set won&#8217;t work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jayasankar</title>
		<link>http://jonathanlewis.wordpress.com/2010/05/19/ignoring-hints-3/#comment-50516</link>
		<dc:creator><![CDATA[jayasankar]]></dc:creator>
		<pubDate>Wed, 26 Sep 2012 13:56:11 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3764#comment-50516</guid>
		<description><![CDATA[I have come across strange issue today regarding the ignoring global hints in remote queries.

For instance if we look at below example..
[sourcecode]
explain plan for
INSERT  INTO TESTING tt
                  (ACP_APPL_ID
                   ,ACP_APPL_RECEIVED_DATE
                   ,ACP_APRV_AMT
                                     )
         SELECT /*+ USE_HASH(st.acct st.ext) */
                    ACP_APPL_ID
                   ,ACP_APPL_RECEIVED_DATE
                   ,ACP_APRV_AMT
                    FROM origmgr.acaps_acct_auto_d@infoprod st
          WHERE acp_appl_received_date BETWEEN to_date(&#039;13jun2012&#039;,&#039;ddmonyyyy&#039;) and to_date(&#039;25sep2012&#039;,&#039;ddmonyyyy&#039;)
               and ACP_BRANCH_CODE  is not null;

--------------------------------------------------------------------------------------------------------------
&#124; Id  &#124; Operation                &#124; Name              &#124; Rows  &#124; Bytes &#124; Cost (%CPU)&#124; Time     &#124; Inst   &#124;IN-OUT&#124;
--------------------------------------------------------------------------------------------------------------
&#124;   0 &#124; INSERT STATEMENT         &#124;                   &#124;  1015 &#124; 28420 &#124; 25190   (1)&#124; 00:05:03 &#124;        &#124;      &#124;
&#124;   1 &#124;  LOAD TABLE CONVENTIONAL &#124; TESTING           &#124;       &#124;       &#124;            &#124;          &#124;        &#124;      &#124;
&#124;   2 &#124;   REMOTE                 &#124; ACAPS_ACCT_AUTO_D &#124;  1015 &#124; 28420 &#124; 25190   (1)&#124; 00:05:03 &#124; INFOP~ &#124; R-&gt;S &#124;
--------------------------------------------------------------------------------------------------------------

Remote SQL Information (identified by operation id):
----------------------------------------------------

   2 - SELECT /*+ OPAQUE_TRANSFORM */ &quot;ACP_APPL_ID&quot;,&quot;ACP_APPL_RECEIVED_DATE&quot;,&quot;ACP_APRV_AMT&quot;,&quot;ACP_BRANC
       H_CODE&quot; FROM &quot;ORIGMGR&quot;.&quot;ACAPS_ACCT_AUTO_D&quot; &quot;ST&quot; WHERE &quot;ACP_BRANCH_CODE&quot; IS NOT NULL AND
       &quot;ACP_APPL_RECEIVED_DATE&quot;&gt;=TO_DATE(&#039; 2012-06-13 00:00:00&#039;, &#039;syyyy-mm-dd hh24:mi:ss&#039;) AND
       &quot;ACP_APPL_RECEIVED_DATE&quot;&lt;=TO_DATE(&#039; 2012-09-25 00:00:00&#039;, &#039;syyyy-mm-dd hh24:mi:ss&#039;) (accessing remote)
[/sourcecode]
 we can see it completely ignored hash hint. I am accesing remote database view that&#039;s why i have specified globally. 

 I am wondering is there any way to change this pattern.]]></description>
		<content:encoded><![CDATA[<p>I have come across strange issue today regarding the ignoring global hints in remote queries.</p>
<p>For instance if we look at below example..</p>
<pre class="brush: plain; title: ; notranslate">
explain plan for
INSERT  INTO TESTING tt
                  (ACP_APPL_ID
                   ,ACP_APPL_RECEIVED_DATE
                   ,ACP_APRV_AMT
                                     )
         SELECT /*+ USE_HASH(st.acct st.ext) */
                    ACP_APPL_ID
                   ,ACP_APPL_RECEIVED_DATE
                   ,ACP_APRV_AMT
                    FROM origmgr.acaps_acct_auto_d@infoprod st
          WHERE acp_appl_received_date BETWEEN to_date('13jun2012','ddmonyyyy') and to_date('25sep2012','ddmonyyyy')
               and ACP_BRANCH_CODE  is not null;

--------------------------------------------------------------------------------------------------------------
| Id  | Operation                | Name              | Rows  | Bytes | Cost (%CPU)| Time     | Inst   |IN-OUT|
--------------------------------------------------------------------------------------------------------------
|   0 | INSERT STATEMENT         |                   |  1015 | 28420 | 25190   (1)| 00:05:03 |        |      |
|   1 |  LOAD TABLE CONVENTIONAL | TESTING           |       |       |            |          |        |      |
|   2 |   REMOTE                 | ACAPS_ACCT_AUTO_D |  1015 | 28420 | 25190   (1)| 00:05:03 | INFOP~ | R-&gt;S |
--------------------------------------------------------------------------------------------------------------

Remote SQL Information (identified by operation id):
----------------------------------------------------

   2 - SELECT /*+ OPAQUE_TRANSFORM */ &quot;ACP_APPL_ID&quot;,&quot;ACP_APPL_RECEIVED_DATE&quot;,&quot;ACP_APRV_AMT&quot;,&quot;ACP_BRANC
       H_CODE&quot; FROM &quot;ORIGMGR&quot;.&quot;ACAPS_ACCT_AUTO_D&quot; &quot;ST&quot; WHERE &quot;ACP_BRANCH_CODE&quot; IS NOT NULL AND
       &quot;ACP_APPL_RECEIVED_DATE&quot;&gt;=TO_DATE(' 2012-06-13 00:00:00', 'syyyy-mm-dd hh24:mi:ss') AND
       &quot;ACP_APPL_RECEIVED_DATE&quot;&lt;=TO_DATE(' 2012-09-25 00:00:00', 'syyyy-mm-dd hh24:mi:ss') (accessing remote)
</pre>
<p> we can see it completely ignored hash hint. I am accesing remote database view that&#039;s why i have specified globally. </p>
<p> I am wondering is there any way to change this pattern.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Demonstration of Oracle &#8220;Ignoring&#8221; an Index Hint &#171; Charles Hooper&#039;s Oracle Notes</title>
		<link>http://jonathanlewis.wordpress.com/2010/05/19/ignoring-hints-3/#comment-36860</link>
		<dc:creator><![CDATA[Demonstration of Oracle &#8220;Ignoring&#8221; an Index Hint &#171; Charles Hooper&#039;s Oracle Notes]]></dc:creator>
		<pubDate>Mon, 26 Jul 2010 15:31:31 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3764#comment-36860</guid>
		<description><![CDATA[[...] Bugs in Oracle Database cause the hint to be lost (see Jonathan Lewis&#8217; comment in the above forum post, and the examples on his blog &#8211; for example) [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Bugs in Oracle Database cause the hint to be lost (see Jonathan Lewis&#8217; comment in the above forum post, and the examples on his blog &#8211; for example) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2010/05/19/ignoring-hints-3/#comment-36305</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sun, 23 May 2010 13:42:24 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3764#comment-36305</guid>
		<description><![CDATA[Jeff,

I do have a strategy for translating ANSI to Oracle (since I know that ANSI sometimes is the problem) - but it&#039;s an option I would only adopt if I were fairly sure that ANSI was the problem.  

I actually made two mistakes in my analysis in this case - the first one was that I didn&#039;t consider the fact that it might be the SYS account that was causing the problem ... and I should have thought of that before trying the rewrite. The second was rewriting the query correctly instead of writing a simplified variant of the ANSI query to see if it still failed, rather than spending time doing an exact rewrite into Oracle SQL.

Rewriting queries is something I&#039;m not keen on (even Oracle to Oracle), because it can be very hard to prove that the rewrite is logically equivalent to the original.




]]></description>
		<content:encoded><![CDATA[<p>Jeff,</p>
<p>I do have a strategy for translating ANSI to Oracle (since I know that ANSI sometimes is the problem) &#8211; but it&#8217;s an option I would only adopt if I were fairly sure that ANSI was the problem.  </p>
<p>I actually made two mistakes in my analysis in this case &#8211; the first one was that I didn&#8217;t consider the fact that it might be the SYS account that was causing the problem &#8230; and I should have thought of that before trying the rewrite. The second was rewriting the query correctly instead of writing a simplified variant of the ANSI query to see if it still failed, rather than spending time doing an exact rewrite into Oracle SQL.</p>
<p>Rewriting queries is something I&#8217;m not keen on (even Oracle to Oracle), because it can be very hard to prove that the rewrite is logically equivalent to the original.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Moss</title>
		<link>http://jonathanlewis.wordpress.com/2010/05/19/ignoring-hints-3/#comment-36278</link>
		<dc:creator><![CDATA[Jeff Moss]]></dc:creator>
		<pubDate>Thu, 20 May 2010 05:53:14 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3764#comment-36278</guid>
		<description><![CDATA[Interesting...and funny that you have a strategy of converting ANSI SQL to Oracle dialect when you encounter a problem...that&#039;s the first thing I do when someone hands me any ANSI SQL. Over the past two days, I&#039;ve been given three pieces of SQL, all of which were getting a suboptimal plan, but when converted to Oracle dialect - no other changes and they were all reasonably simple SQL - the plan improved considerably and the query ran in minutes, rather than days.]]></description>
		<content:encoded><![CDATA[<p>Interesting&#8230;and funny that you have a strategy of converting ANSI SQL to Oracle dialect when you encounter a problem&#8230;that&#8217;s the first thing I do when someone hands me any ANSI SQL. Over the past two days, I&#8217;ve been given three pieces of SQL, all of which were getting a suboptimal plan, but when converted to Oracle dialect &#8211; no other changes and they were all reasonably simple SQL &#8211; the plan improved considerably and the query ran in minutes, rather than days.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
