<?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: SQL Tuning Advisor Profiles</title>
	<atom:link href="http://kerryosborne.oracle-guy.com/2010/02/sql-tuning-advisor-profiles/feed/" rel="self" type="application/rss+xml" />
	<link>http://kerryosborne.oracle-guy.com/2010/02/sql-tuning-advisor-profiles/</link>
	<description>Just another Oracle blog</description>
	<pubDate>Thu, 29 Jul 2010 12:02:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Blogroll Report 29/01/2009 – 05/02/2010 &#171; Coskan&#8217;s Approach to Oracle</title>
		<link>http://kerryosborne.oracle-guy.com/2010/02/sql-tuning-advisor-profiles/#comment-7937</link>
		<dc:creator>Blogroll Report 29/01/2009 – 05/02/2010 &#171; Coskan&#8217;s Approach to Oracle</dc:creator>
		<pubDate>Fri, 05 Mar 2010 10:24:39 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=2201#comment-7937</guid>
		<description>[...] SQL Profiles and manual sql profile (comments) Kerry Osborne-Single Hint SQL Profiles Kerry Osborne-SQL Tuning Advisor Profiles 22-How to do pivoting pre-11G? Marc Billette-Easy Pivot Query Result in pre-11g Oracle    Comments [...]</description>
		<content:encoded><![CDATA[<p>[...] SQL Profiles and manual sql profile (comments) Kerry Osborne-Single Hint SQL Profiles Kerry Osborne-SQL Tuning Advisor Profiles 22-How to do pivoting pre-11G? Marc Billette-Easy Pivot Query Result in pre-11g Oracle    Comments [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: osborne</title>
		<link>http://kerryosborne.oracle-guy.com/2010/02/sql-tuning-advisor-profiles/#comment-7306</link>
		<dc:creator>osborne</dc:creator>
		<pubDate>Sat, 13 Feb 2010 18:51:36 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=2201#comment-7306</guid>
		<description>Jonathan,

Well rats! I hate it when I am wrong! My script was combining hints for multiple Profiles (if there happened to be more than one Profile on the same statement, which is possible if you use multiple categories - a bit unusual but very possible). This was exactly the case in my test. Brilliant piece of deduction on your part by the way, without actually seeing the system - especially since I hacked up the hints to protect the table and column names. At any rate, I'm back to where I was before with a Profile of unknown origin that has a mixture of opt_estimate and other hints, but no proof that it was generated by the Tuning Advisor. It's possible someone manually added hints or changed the name of the profile, although I can't get anyone to fess up to that. So still a bit of a mystery to unravel there - another post I'm sure. 

At any rate, I've updated my &lt;a href="http://kerryosborne.oracle-guy.com/scripts/sql_profile_hints.sql" rel="nofollow"&gt;sql_profile_hints&lt;/a&gt; script to add the additional join (on category). Thanks for taking the time to look carefully at this post and comment on it.


Kerry</description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>Well rats! I hate it when I am wrong! My script was combining hints for multiple Profiles (if there happened to be more than one Profile on the same statement, which is possible if you use multiple categories - a bit unusual but very possible). This was exactly the case in my test. Brilliant piece of deduction on your part by the way, without actually seeing the system - especially since I hacked up the hints to protect the table and column names. At any rate, I&#8217;m back to where I was before with a Profile of unknown origin that has a mixture of opt_estimate and other hints, but no proof that it was generated by the Tuning Advisor. It&#8217;s possible someone manually added hints or changed the name of the profile, although I can&#8217;t get anyone to fess up to that. So still a bit of a mystery to unravel there - another post I&#8217;m sure. </p>
<p>At any rate, I&#8217;ve updated my <a href="http://kerryosborne.oracle-guy.com/scripts/sql_profile_hints.sql"  rel="nofollow">sql_profile_hints</a> script to add the additional join (on category). Thanks for taking the time to look carefully at this post and comment on it.</p>
<p>Kerry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: osborne</title>
		<link>http://kerryosborne.oracle-guy.com/2010/02/sql-tuning-advisor-profiles/#comment-7300</link>
		<dc:creator>osborne</dc:creator>
		<pubDate>Sat, 13 Feb 2010 16:19:56 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=2201#comment-7300</guid>
		<description>Excellent observation. I always just figured they didn't do a very good job of programming, but now that I think about it a little, it seems unlikely that the programmers would not catch multiple all_rows hints in the same profile, much less multiple opt_estimates on the same operation (which I hadn't noticed). I'll have a look at that specific example and let you know what I find. 

Kerry</description>
		<content:encoded><![CDATA[<p>Excellent observation. I always just figured they didn&#8217;t do a very good job of programming, but now that I think about it a little, it seems unlikely that the programmers would not catch multiple all_rows hints in the same profile, much less multiple opt_estimates on the same operation (which I hadn&#8217;t noticed). I&#8217;ll have a look at that specific example and let you know what I find. </p>
<p>Kerry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://kerryosborne.oracle-guy.com/2010/02/sql-tuning-advisor-profiles/#comment-7297</link>
		<dc:creator>Jonathan Lewis</dc:creator>
		<pubDate>Sat, 13 Feb 2010 15:17:33 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=2201#comment-7297</guid>
		<description>Kerry,

Thanks for following up that topic.
Interesting result - but there's an anomaly that I'd want to look into.  

Note that your output shows the ALL_ROWS hint three times; that's suspect.  Then near the end of the output you've got:

OPT_ESTIMATE(@"SEL$5DA710D3", TABLE, "D"@"SEL$1", SCALE_ROWS=11.39782103)
OPT_ESTIMATE(@"SEL$5DA710D3", TABLE, "D"@"SEL$1", SCALE_ROWS=11.95241429)

It's the same transformed query block referencing the same alias twice with different scale factors. Again, that's suspect; and it happens at many points in the hint set.

I suspect that you've managed to report two profiles as one - which doesn't preclude the possibility that there is a faked set that holds the 'outline' type hints and your generated set is just 'stats' hints.

Regards
Jonathan Lewis</description>
		<content:encoded><![CDATA[<p>Kerry,</p>
<p>Thanks for following up that topic.<br />
Interesting result - but there&#8217;s an anomaly that I&#8217;d want to look into.  </p>
<p>Note that your output shows the ALL_ROWS hint three times; that&#8217;s suspect.  Then near the end of the output you&#8217;ve got:</p>
<p>OPT_ESTIMATE(@&#8221;SEL$5DA710D3&#8243;, TABLE, &#8220;D&#8221;@&#8221;SEL$1&#8243;, SCALE_ROWS=11.39782103)<br />
OPT_ESTIMATE(@&#8221;SEL$5DA710D3&#8243;, TABLE, &#8220;D&#8221;@&#8221;SEL$1&#8243;, SCALE_ROWS=11.95241429)</p>
<p>It&#8217;s the same transformed query block referencing the same alias twice with different scale factors. Again, that&#8217;s suspect; and it happens at many points in the hint set.</p>
<p>I suspect that you&#8217;ve managed to report two profiles as one - which doesn&#8217;t preclude the possibility that there is a faked set that holds the &#8216;outline&#8217; type hints and your generated set is just &#8217;stats&#8217; hints.</p>
<p>Regards<br />
Jonathan Lewis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Mann</title>
		<link>http://kerryosborne.oracle-guy.com/2010/02/sql-tuning-advisor-profiles/#comment-7032</link>
		<dc:creator>David Mann</dc:creator>
		<pubDate>Fri, 05 Feb 2010 19:53:28 +0000</pubDate>
		<guid isPermaLink="false">http://kerryosborne.oracle-guy.com/?p=2201#comment-7032</guid>
		<description>I agree with your points. I was recently horrified when a recent STA job had recommended a plan with about 20 cardinality hints. No way I would consider implementing that suggestion as it would quickly be wrong. 

It did give me a direction to start looking and further analysis with GATHER_PLAN_STATISTICS showed me exactly where Estimated Rows and Actual Rows were getting hosed. 

But sometimes a simple switch between ALL_ROWS and FIRST_ROWS will be something that is generic enough to feel safe implementing.</description>
		<content:encoded><![CDATA[<p>I agree with your points. I was recently horrified when a recent STA job had recommended a plan with about 20 cardinality hints. No way I would consider implementing that suggestion as it would quickly be wrong. </p>
<p>It did give me a direction to start looking and further analysis with GATHER_PLAN_STATISTICS showed me exactly where Estimated Rows and Actual Rows were getting hosed. </p>
<p>But sometimes a simple switch between ALL_ROWS and FIRST_ROWS will be something that is generic enough to feel safe implementing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
