<?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"
	>
<channel>
	<title>Comments on: Oracle Outlines - aka Plan Stability</title>
	<atom:link href="http://kerryosborne.oracle-guy.com/2008/12/oracle-outlines-aka-plan-stability/feed/" rel="self" type="application/rss+xml" />
	<link>http://kerryosborne.oracle-guy.com/2008/12/oracle-outlines-aka-plan-stability/</link>
	<description>Just another Oracle blog</description>
	<pubDate>Thu, 29 Jul 2010 12:01:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Alibaba DBA Team &#187; 在Oracle 9中伪造存储概要</title>
		<link>http://kerryosborne.oracle-guy.com/2008/12/oracle-outlines-aka-plan-stability/#comment-6977</link>
		<dc:creator>Alibaba DBA Team &#187; 在Oracle 9中伪造存储概要</dc:creator>
		<pubDate>Thu, 04 Feb 2010 08:05:45 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=742#comment-6977</guid>
		<description>[...] 关于stored outline还有以下相关资料可以对照阅读下: Oracle Outlines - aka Plan Stability By Kerry Osborne Plan stability in 10g - using existing cursors to create Stored Outlines and SQL [...]</description>
		<content:encoded><![CDATA[<p>[...] 关于stored outline还有以下相关资料可以对照阅读下: Oracle Outlines - aka Plan Stability By Kerry Osborne Plan stability in 10g - using existing cursors to create Stored Outlines and SQL [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kerry Osborne&#8217;s Oracle Blog &#187; Blog Archive Oracle 11g SQL Plan Management - SQL Plan Baselines - Kerry Osborne’s Oracle Blog</title>
		<link>http://kerryosborne.oracle-guy.com/2008/12/oracle-outlines-aka-plan-stability/#comment-3697</link>
		<dc:creator>Kerry Osborne&#8217;s Oracle Blog &#187; Blog Archive Oracle 11g SQL Plan Management - SQL Plan Baselines - Kerry Osborne’s Oracle Blog</dc:creator>
		<pubDate>Wed, 29 Jul 2009 19:05:08 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=742#comment-3697</guid>
		<description>[...] latest evolution in Oracle&#8217;s efforts to allow a plan to be locked. The previous efforts were Outlines and SQL Profiles. Both of those efforts were based on the idea that hints could be applied to limit [...]</description>
		<content:encoded><![CDATA[<p>[...] latest evolution in Oracle&#8217;s efforts to allow a plan to be locked. The previous efforts were Outlines and SQL Profiles. Both of those efforts were based on the idea that hints could be applied to limit [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kerry Osborne&#8217;s Oracle Blog &#187; Blog Archive SQL Profiles - Kerry Osborne’s Oracle Blog</title>
		<link>http://kerryosborne.oracle-guy.com/2008/12/oracle-outlines-aka-plan-stability/#comment-383</link>
		<dc:creator>Kerry Osborne&#8217;s Oracle Blog &#187; Blog Archive SQL Profiles - Kerry Osborne’s Oracle Blog</dc:creator>
		<pubDate>Sun, 05 Apr 2009 03:45:15 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=742#comment-383</guid>
		<description>[...] give credit to Randolf Geist for making me take a second look at SQL Profiles. He commented on my Outlines post last week and recommended I give his post on SQL Profiles a look. I did and it really got me [...]</description>
		<content:encoded><![CDATA[<p>[...] give credit to Randolf Geist for making me take a second look at SQL Profiles. He commented on my Outlines post last week and recommended I give his post on SQL Profiles a look. I did and it really got me [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: osborne</title>
		<link>http://kerryosborne.oracle-guy.com/2008/12/oracle-outlines-aka-plan-stability/#comment-332</link>
		<dc:creator>osborne</dc:creator>
		<pubDate>Wed, 01 Apr 2009 21:33:56 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=742#comment-332</guid>
		<description>Excellent post. I had not run across it. I had been thinking about writing something to pull a plan from the awr tables but hadn't gotten around to it yet. So that will save me some work! 

I do agree with you that SQL Profiles have the advantage of being able to force matching of statements using literals. Outlines, SQL Profiles, and now Baselines all can provide similar functionality, each with their own little twist. I have primarily used SQL Profiles in conjunction with the SQL Tuning Advisor where by SQL Profiles are created based on it's analysis. These SQL Profiles often make use of the OPT_ESTIMATE hint to scale an estimate for a particular step one direction or the other. These are the hints that make SQL Profiles less attractive to my way of thinking, because these scaling factors stay fixed although the statistics and data in the object can and do change. So a scaling factor that made sense last month may not make any sense this month. That's why I said that they tend to sour over time. Again, I believe this is specific to using the SQL Tuning Advisor and the SQL Profiles that it generates, so I should probably re-word my post to be a little more clear on that issue. 

I must say, that of all three seems much better than trying to come up with a set of hints that will only allow the optimizer to choose one plan. The later seems like an approach that is doomed to failure. That said, the approach has worked pretty well for quite a while, at least on relatively simple queries where the optimizer doesn't have that may choices to begin with. And it is really the only option prior to 11g. I am working on a post on baselines now, as I have been able to work with an production 11g system for a while now where we are using them. 

Thanks for your comments and the heads up on your post.

Kerry</description>
		<content:encoded><![CDATA[<p>Excellent post. I had not run across it. I had been thinking about writing something to pull a plan from the awr tables but hadn&#8217;t gotten around to it yet. So that will save me some work! </p>
<p>I do agree with you that SQL Profiles have the advantage of being able to force matching of statements using literals. Outlines, SQL Profiles, and now Baselines all can provide similar functionality, each with their own little twist. I have primarily used SQL Profiles in conjunction with the SQL Tuning Advisor where by SQL Profiles are created based on it&#8217;s analysis. These SQL Profiles often make use of the OPT_ESTIMATE hint to scale an estimate for a particular step one direction or the other. These are the hints that make SQL Profiles less attractive to my way of thinking, because these scaling factors stay fixed although the statistics and data in the object can and do change. So a scaling factor that made sense last month may not make any sense this month. That&#8217;s why I said that they tend to sour over time. Again, I believe this is specific to using the SQL Tuning Advisor and the SQL Profiles that it generates, so I should probably re-word my post to be a little more clear on that issue. </p>
<p>I must say, that of all three seems much better than trying to come up with a set of hints that will only allow the optimizer to choose one plan. The later seems like an approach that is doomed to failure. That said, the approach has worked pretty well for quite a while, at least on relatively simple queries where the optimizer doesn&#8217;t have that may choices to begin with. And it is really the only option prior to 11g. I am working on a post on baselines now, as I have been able to work with an production 11g system for a while now where we are using them. </p>
<p>Thanks for your comments and the heads up on your post.</p>
<p>Kerry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Randolf Geist</title>
		<link>http://kerryosborne.oracle-guy.com/2008/12/oracle-outlines-aka-plan-stability/#comment-331</link>
		<dc:creator>Randolf Geist</dc:creator>
		<pubDate>Wed, 01 Apr 2009 07:05:07 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=742#comment-331</guid>
		<description>Kerry,

I've recently published a blog post where I compare Stored Outlines and SQL Profiles in 10g when attempting to lock down execution plans having the "good" one already in the shared pool (or e.g. AWR, see blog). The method described in my blog post using SQL Profiles offers some additional functionality/flexibility you don't have with Stored Outlines, so it might be worth a try.

In passing I've noticed an odd behaviour of the DBMS_OUTLN.CREATE_OUTLINE procedure in my 10.2.0.4 test runs (apart from the bug in the previous releases) since it didn't pick up the hints stored along with the plan in the shared pool, but obviously created an outline using the present statistics, which might be irritating.

For more details, see the &lt;a href="http://oracle-randolf.blogspot.com/2009/03/plan-stability-in-10g-using-existing.html" rel="nofollow"&gt;blog post&lt;/a&gt;.

Regards,
Randolf

Oracle related stuff blog:
http://oracle-randolf.blogspot.com/

SQLTools++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676/
http://sourceforge.net/projects/sqlt-pp/</description>
		<content:encoded><![CDATA[<p>Kerry,</p>
<p>I&#8217;ve recently published a blog post where I compare Stored Outlines and SQL Profiles in 10g when attempting to lock down execution plans having the &#8220;good&#8221; one already in the shared pool (or e.g. AWR, see blog). The method described in my blog post using SQL Profiles offers some additional functionality/flexibility you don&#8217;t have with Stored Outlines, so it might be worth a try.</p>
<p>In passing I&#8217;ve noticed an odd behaviour of the DBMS_OUTLN.CREATE_OUTLINE procedure in my 10.2.0.4 test runs (apart from the bug in the previous releases) since it didn&#8217;t pick up the hints stored along with the plan in the shared pool, but obviously created an outline using the present statistics, which might be irritating.</p>
<p>For more details, see the <a href="http://oracle-randolf.blogspot.com/2009/03/plan-stability-in-10g-using-existing.html" onclick="javascript:pageTracker._trackPageview('/outbound/comment/oracle-randolf.blogspot.com');" rel="nofollow">blog post</a>.</p>
<p>Regards,<br />
Randolf</p>
<p>Oracle related stuff blog:<br />
<a href="http://oracle-randolf.blogspot.com/" onclick="javascript:pageTracker._trackPageview('/outbound/comment/oracle-randolf.blogspot.com');" rel="nofollow">http://oracle-randolf.blogspot.com/</a></p>
<p>SQLTools++ for Oracle (Open source Oracle GUI for Windows):<br />
<a href="http://www.sqltools-plusplus.org:7676/" onclick="javascript:pageTracker._trackPageview('/outbound/comment/www.sqltools-plusplus.org:7676');" rel="nofollow">http://www.sqltools-plusplus.org:7676/</a><br />
<a href="http://sourceforge.net/projects/sqlt-pp/" onclick="javascript:pageTracker._trackPageview('/outbound/comment/sourceforge.net');" rel="nofollow">http://sourceforge.net/projects/sqlt-pp/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kerry Osborne&#8217;s Oracle Blog &#187; Blog Archive Bind Variable Peeking - Drives Me Nuts! - Kerry Osborne’s Oracle Blog</title>
		<link>http://kerryosborne.oracle-guy.com/2008/12/oracle-outlines-aka-plan-stability/#comment-328</link>
		<dc:creator>Kerry Osborne&#8217;s Oracle Blog &#187; Blog Archive Bind Variable Peeking - Drives Me Nuts! - Kerry Osborne’s Oracle Blog</dc:creator>
		<pubDate>Mon, 30 Mar 2009 22:49:33 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=742#comment-328</guid>
		<description>[...] forcing the optimizer&#8217;s hand such as Outlines (see my previous posts on Unstable Plans and on Outlines). This option provides a quick method of locking in a single plan, but it&#8217;s not fool proof. [...]</description>
		<content:encoded><![CDATA[<p>[...] forcing the optimizer&#8217;s hand such as Outlines (see my previous posts on Unstable Plans and on Outlines). This option provides a quick method of locking in a single plan, but it&#8217;s not fool proof. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: osborne</title>
		<link>http://kerryosborne.oracle-guy.com/2008/12/oracle-outlines-aka-plan-stability/#comment-316</link>
		<dc:creator>osborne</dc:creator>
		<pubDate>Tue, 24 Mar 2009 15:38:39 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=742#comment-316</guid>
		<description>Roberto,

  Sorry for the delay in replying (I've been a bit swamped lately). It's true that outlines don't always work. The idea is for Oracle to come up with a set of hints that keep the optimizer from doing anything except the current plan. Unfortunately, occasionally there is still room for the optimizer to pick more than one plan. A good example is the new form of the index hint that specifies the table and the column that you want to use an index on (as I mentioned in my previous comment). This hint does not force the use of a single index, it will allow the optimizer to pick any index that contains that combination. So if you have the same column in more than one index, you can get a different plan. Or if you add a new index, the outline might actually pick it up. This is more likely in later releases and obviously in more complicated SQL statements. So as always, testing is important to make sure it's doing what you want. I do continue to believe that outlines are more stable than SQL profiles. Of course the best way to deal with the issue is to give the optimizer the info it needs using literals where histograms are needed, so we're really talking about situations where we can't directly affect the code.

  On a side note, I have created a few outlines in an 11g production environment now, and for simple statements they seem to behave themselves. I am currently experimenting with baselines, as I believe that is a much better approach (actually capturing and saving the execution plan). I hope to write something up on that shortly.

Kerry</description>
		<content:encoded><![CDATA[<p>Roberto,</p>
<p>  Sorry for the delay in replying (I&#8217;ve been a bit swamped lately). It&#8217;s true that outlines don&#8217;t always work. The idea is for Oracle to come up with a set of hints that keep the optimizer from doing anything except the current plan. Unfortunately, occasionally there is still room for the optimizer to pick more than one plan. A good example is the new form of the index hint that specifies the table and the column that you want to use an index on (as I mentioned in my previous comment). This hint does not force the use of a single index, it will allow the optimizer to pick any index that contains that combination. So if you have the same column in more than one index, you can get a different plan. Or if you add a new index, the outline might actually pick it up. This is more likely in later releases and obviously in more complicated SQL statements. So as always, testing is important to make sure it&#8217;s doing what you want. I do continue to believe that outlines are more stable than SQL profiles. Of course the best way to deal with the issue is to give the optimizer the info it needs using literals where histograms are needed, so we&#8217;re really talking about situations where we can&#8217;t directly affect the code.</p>
<p>  On a side note, I have created a few outlines in an 11g production environment now, and for simple statements they seem to behave themselves. I am currently experimenting with baselines, as I believe that is a much better approach (actually capturing and saving the execution plan). I hope to write something up on that shortly.</p>
<p>Kerry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roberto</title>
		<link>http://kerryosborne.oracle-guy.com/2008/12/oracle-outlines-aka-plan-stability/#comment-311</link>
		<dc:creator>Roberto</dc:creator>
		<pubDate>Wed, 18 Mar 2009 09:53:42 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=742#comment-311</guid>
		<description>It is not a reproducible case test, however it is not a fake.
I omitted sql profile and outline creations, and the statement, plans, etc., for customer privacy, they are quite complexes.

select plan_hash_value, sql_id, hash_value, child_number, OUTLINE_CATEGORY, SQL_PROFILE
  from v$sql
  where sql_id = '2g985t2xpm0gf';

 PLAN_HASH_VALUE SQL_ID           HASH_VALUE  CHILD_NUMBER OUTLINE_CATEGORY SQL_PROFILE
---------------- --------------- ----------- ------------- ---------------- -----------
      2269489710 2g985t2xpm0gf    3143205358             0

begin
dbms_sqltune.alter_sql_profile(
  name           =&#62; 'to_fix_with_outline',
  attribute_name =&#62; 'status',
  value          =&#62; 'enabled'
);
end;
/

select plan_hash_value, sql_id, hash_value, child_number, OUTLINE_CATEGORY, SQL_PROFILE
  from v$sql
  where sql_id = '2g985t2xpm0gf';

 PLAN_HASH_VALUE SQL_ID           HASH_VALUE  CHILD_NUMBER OUTLINE_CATEGORY SQL_PROFILE
---------------- --------------- ----------- ------------- ---------------- --------------------
       482806775 2g985t2xpm0gf    3143205358             0                  to_fix_with_outline


alter session set use_stored_outlines = true;

select plan_hash_value, sql_id, hash_value, child_number, OUTLINE_CATEGORY, SQL_PROFILE
  from v$sql
  where sql_id = '2g985t2xpm0gf';

 PLAN_HASH_VALUE SQL_ID           HASH_VALUE  CHILD_NUMBER OUTLINE_CATEGORY SQL_PROFILE
---------------- --------------- ----------- ------------- ---------------- --------------------
       482806775 2g985t2xpm0gf    3143205358             0                  to_fix_with_outline
      2269489710 2g985t2xpm0gf    3143205358             1 DEFAULT


Since I verified some times the method don't work, I believed it was a wrong method generally.
But I tried with a artificial case test and it works actually, hence is a possible method.
Can you suggest me any clue because the plan changes?

Best regards,
Roberto</description>
		<content:encoded><![CDATA[<p>It is not a reproducible case test, however it is not a fake.<br />
I omitted sql profile and outline creations, and the statement, plans, etc., for customer privacy, they are quite complexes.</p>
<p>select plan_hash_value, sql_id, hash_value, child_number, OUTLINE_CATEGORY, SQL_PROFILE<br />
  from v$sql<br />
  where sql_id = &#8216;2g985t2xpm0gf&#8217;;</p>
<p> PLAN_HASH_VALUE SQL_ID           HASH_VALUE  CHILD_NUMBER OUTLINE_CATEGORY SQL_PROFILE<br />
&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8211;<br />
      2269489710 2g985t2xpm0gf    3143205358             0</p>
<p>begin<br />
dbms_sqltune.alter_sql_profile(<br />
  name           =&gt; &#8216;to_fix_with_outline&#8217;,<br />
  attribute_name =&gt; &#8217;status&#8217;,<br />
  value          =&gt; &#8216;enabled&#8217;<br />
);<br />
end;<br />
/</p>
<p>select plan_hash_value, sql_id, hash_value, child_number, OUTLINE_CATEGORY, SQL_PROFILE<br />
  from v$sql<br />
  where sql_id = &#8216;2g985t2xpm0gf&#8217;;</p>
<p> PLAN_HASH_VALUE SQL_ID           HASH_VALUE  CHILD_NUMBER OUTLINE_CATEGORY SQL_PROFILE<br />
&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
       482806775 2g985t2xpm0gf    3143205358             0                  to_fix_with_outline</p>
<p>alter session set use_stored_outlines = true;</p>
<p>select plan_hash_value, sql_id, hash_value, child_number, OUTLINE_CATEGORY, SQL_PROFILE<br />
  from v$sql<br />
  where sql_id = &#8216;2g985t2xpm0gf&#8217;;</p>
<p> PLAN_HASH_VALUE SQL_ID           HASH_VALUE  CHILD_NUMBER OUTLINE_CATEGORY SQL_PROFILE<br />
&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
       482806775 2g985t2xpm0gf    3143205358             0                  to_fix_with_outline<br />
      2269489710 2g985t2xpm0gf    3143205358             1 DEFAULT</p>
<p>Since I verified some times the method don&#8217;t work, I believed it was a wrong method generally.<br />
But I tried with a artificial case test and it works actually, hence is a possible method.<br />
Can you suggest me any clue because the plan changes?</p>
<p>Best regards,<br />
Roberto</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: osborne</title>
		<link>http://kerryosborne.oracle-guy.com/2008/12/oracle-outlines-aka-plan-stability/#comment-310</link>
		<dc:creator>osborne</dc:creator>
		<pubDate>Tue, 17 Mar 2009 14:20:29 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=742#comment-310</guid>
		<description>Roberto,

  First off, thanks for you comment. Outlines (and profiles too for that matter) are definitely not foolproof. They don't actually store the plan, just a set of hints that they hope will force the optimizer to choose a certain plan. Seems like it would have been easier just to save the plan itself, rather than to try to come up with a set of hints.  But that's a whole other discussion. 

  A common technique with outlines is to try to coerce a statement to use the plan you want (obviously without changing it's text). This can be done in many ways, changing optimizer parameters at session level, changing stats, creating views with embedded hints, etc... Creating a profile is just another way to coerce a plan you want. I must admit that I have not used this trick extensively (only on one production system). But the technic appears valid. By that I mean, that you can create an outline on a statement that has a profile already created on it. And that the optimizer appears to then use the outline.  It probably would be wise to disable the profile if you do this by the way. My main point was that outlines (while certainly not perfect) are much more likely to remain constant than profiles, because profiles tend to adjust optimizer calculations by applying scaling factors. So they tend to "sour" - that is, as the statistics change, the scaling factors no longer have the desired affect. 

  I will say that I have seen outlines that were much less specific than I would have expected. For example, the index hints in 10.2 commonly use the form that specifies the columns instead of the actual index name, like so: 

   INDEX(@"SEL$1" "SKEW"@"SEL$1" ("SKEW"."PK_COL")) 

  This hint just says use an index on the skew.pk_col column if one exists. It doesn't specify which index to use. So even with outlines, Oracle sometimes leaves itself some wiggly room. And the more complicated the statement, the more chance there is that this type of issue might crop up.

  One final thought, I really like outlines because they allow us to manipulate the system (trick it if you will) when we can't touch the code. I also like them because they are relatively quick to turn on and off. But, and this is a big but, they should really be considered just a temporary fix until you can get the optimizer doing what it should by having the correct statistics, using literals where necessary, etc... 

  There are certainly cases where outlines go wrong. I'd be interested in seeing an example of one where you had a profile and created an outline that changed the plan.

Kerry</description>
		<content:encoded><![CDATA[<p>Roberto,</p>
<p>  First off, thanks for you comment. Outlines (and profiles too for that matter) are definitely not foolproof. They don&#8217;t actually store the plan, just a set of hints that they hope will force the optimizer to choose a certain plan. Seems like it would have been easier just to save the plan itself, rather than to try to come up with a set of hints.  But that&#8217;s a whole other discussion. </p>
<p>  A common technique with outlines is to try to coerce a statement to use the plan you want (obviously without changing it&#8217;s text). This can be done in many ways, changing optimizer parameters at session level, changing stats, creating views with embedded hints, etc&#8230; Creating a profile is just another way to coerce a plan you want. I must admit that I have not used this trick extensively (only on one production system). But the technic appears valid. By that I mean, that you can create an outline on a statement that has a profile already created on it. And that the optimizer appears to then use the outline.  It probably would be wise to disable the profile if you do this by the way. My main point was that outlines (while certainly not perfect) are much more likely to remain constant than profiles, because profiles tend to adjust optimizer calculations by applying scaling factors. So they tend to &#8220;sour&#8221; - that is, as the statistics change, the scaling factors no longer have the desired affect. </p>
<p>  I will say that I have seen outlines that were much less specific than I would have expected. For example, the index hints in 10.2 commonly use the form that specifies the columns instead of the actual index name, like so: </p>
<p>   INDEX(@&#8221;SEL$1&#8243; &#8220;SKEW&#8221;@&#8221;SEL$1&#8243; (&#8221;SKEW&#8221;.&#8221;PK_COL&#8221;)) </p>
<p>  This hint just says use an index on the skew.pk_col column if one exists. It doesn&#8217;t specify which index to use. So even with outlines, Oracle sometimes leaves itself some wiggly room. And the more complicated the statement, the more chance there is that this type of issue might crop up.</p>
<p>  One final thought, I really like outlines because they allow us to manipulate the system (trick it if you will) when we can&#8217;t touch the code. I also like them because they are relatively quick to turn on and off. But, and this is a big but, they should really be considered just a temporary fix until you can get the optimizer doing what it should by having the correct statistics, using literals where necessary, etc&#8230; </p>
<p>  There are certainly cases where outlines go wrong. I&#8217;d be interested in seeing an example of one where you had a profile and created an outline that changed the plan.</p>
<p>Kerry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roberto</title>
		<link>http://kerryosborne.oracle-guy.com/2008/12/oracle-outlines-aka-plan-stability/#comment-308</link>
		<dc:creator>Roberto</dc:creator>
		<pubDate>Mon, 16 Mar 2009 15:12:50 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=742#comment-308</guid>
		<description>"By the way, there is nothing wrong with using a profile to get the plan you want and then creating an outline to lock it in" don'work!
When you create outline the plan (fixed by SQL profile)changes.

Roberto</description>
		<content:encoded><![CDATA[<p>&#8220;By the way, there is nothing wrong with using a profile to get the plan you want and then creating an outline to lock it in&#8221; don&#8217;work!<br />
When you create outline the plan (fixed by SQL profile)changes.</p>
<p>Roberto</p>
]]></content:encoded>
	</item>
</channel>
</rss>
