<?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: Debugging SQL with Oracle Cost Based Optimizer</title>
	<atom:link href="http://blog.notesonsiebel.com/2007/10/16/debugging-sql-with-oracle-cost-based-optimizer/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.notesonsiebel.com/2007/10/16/debugging-sql-with-oracle-cost-based-optimizer/</link>
	<description>Technical advice, help and instruction with Siebel Systems</description>
	<pubDate>Fri, 21 Nov 2008 20:14:13 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: stuandgravy</title>
		<link>http://blog.notesonsiebel.com/2007/10/16/debugging-sql-with-oracle-cost-based-optimizer/#comment-57</link>
		<dc:creator>stuandgravy</dc:creator>
		<pubDate>Tue, 27 Nov 2007 11:25:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/10/16/debugging-sql-with-oracle-cost-based-optimizer/#comment-57</guid>
		<description>Great info, thanks Mike.

Robert's &lt;a href="http://siebel.ittoolbox.com/groups/technical-functional/siebel-dev-l/making-siebel-run-fast-with-oracle-cbo-new-pps-recommendation-optimizer_index_cost_adj-1717907" rel="nofollow"&gt;original post&lt;/a&gt;, for anyone interested.</description>
		<content:encoded><![CDATA[<p>Great info, thanks Mike.</p>
<p>Robert&#8217;s <a href="http://siebel.ittoolbox.com/groups/technical-functional/siebel-dev-l/making-siebel-run-fast-with-oracle-cbo-new-pps-recommendation-optimizer_index_cost_adj-1717907" rel="nofollow" onclick="javascript:pageTracker._trackPageview('/outbound/comment/siebel.ittoolbox.com');">original post</a>, for anyone interested.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Lin</title>
		<link>http://blog.notesonsiebel.com/2007/10/16/debugging-sql-with-oracle-cost-based-optimizer/#comment-56</link>
		<dc:creator>Mike Lin</dc:creator>
		<pubDate>Tue, 27 Nov 2007 00:54:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/10/16/debugging-sql-with-oracle-cost-based-optimizer/#comment-56</guid>
		<description>There was an interesting post on ITToolbox from Robert Ponder about the Oracle CBO parameter optimizer_index_cost_adj, which is a setting that tells the optimizer whether to favor index scans or full-table scans.  Oracle's default value of 100 (on a 1 to 1000 range) tells the optimizer that the cost of each is the same, so the optimizer weights them equally when determining the execution plan.  Siebel recommends a value of 1, which tells the optimizer that index scans are much prefered over full-table scans.

The new thinking is that this value might be too low, and a setting of 1 may result in a less-than-optimal plan to be chosen.  I don't fully understand it, so I can't tell you what the sweet spot is.  Robert is recommending a setting of 10, although an Oracle RAC expert recommended setting this parameter back to the default setting of 100.

The way to fine-tune this may just be to start lowering the value from 100 until you get a peak in performance.

For those of you thinking, "but isn't it always better to do a index scan versus a full-table scan?"  The answer is not always.  It depends on the make-up of your data (especially table size), and your hardware.  The faster your system is able to handle multi-block reads, or the fewer blocks that need to be read, the cheaper full-table scans become.</description>
		<content:encoded><![CDATA[<p>There was an interesting post on ITToolbox from Robert Ponder about the Oracle CBO parameter optimizer_index_cost_adj, which is a setting that tells the optimizer whether to favor index scans or full-table scans.  Oracle&#8217;s default value of 100 (on a 1 to 1000 range) tells the optimizer that the cost of each is the same, so the optimizer weights them equally when determining the execution plan.  Siebel recommends a value of 1, which tells the optimizer that index scans are much prefered over full-table scans.</p>
<p>The new thinking is that this value might be too low, and a setting of 1 may result in a less-than-optimal plan to be chosen.  I don&#8217;t fully understand it, so I can&#8217;t tell you what the sweet spot is.  Robert is recommending a setting of 10, although an Oracle RAC expert recommended setting this parameter back to the default setting of 100.</p>
<p>The way to fine-tune this may just be to start lowering the value from 100 until you get a peak in performance.</p>
<p>For those of you thinking, &#8220;but isn&#8217;t it always better to do a index scan versus a full-table scan?&#8221;  The answer is not always.  It depends on the make-up of your data (especially table size), and your hardware.  The faster your system is able to handle multi-block reads, or the fewer blocks that need to be read, the cheaper full-table scans become.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stuandgravy</title>
		<link>http://blog.notesonsiebel.com/2007/10/16/debugging-sql-with-oracle-cost-based-optimizer/#comment-55</link>
		<dc:creator>stuandgravy</dc:creator>
		<pubDate>Tue, 16 Oct 2007 23:39:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/10/16/debugging-sql-with-oracle-cost-based-optimizer/#comment-55</guid>
		<description>Good point about using bind variables - another thing that can catch you trying to debug.</description>
		<content:encoded><![CDATA[<p>Good point about using bind variables - another thing that can catch you trying to debug.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy C</title>
		<link>http://blog.notesonsiebel.com/2007/10/16/debugging-sql-with-oracle-cost-based-optimizer/#comment-54</link>
		<dc:creator>Andy C</dc:creator>
		<pubDate>Tue, 16 Oct 2007 08:15:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/10/16/debugging-sql-with-oracle-cost-based-optimizer/#comment-54</guid>
		<description>Hi Stuart

Great post. The issue of stats on empty tables is well documented (&lt;a href="https://metalink3.oracle.com/od/faces/secure/km/DocumentDisplay.jspx?id=478242.1&#38;h=Y" rel="nofollow"&gt;Alert 1162&lt;/a&gt;) but not widely known in the Siebel community.

Another potential gotcha when debugging Siebel queries in TOAD is that people often substitute literals where Siebel Object Manager uses bind variables.

The presence of literals forces Oracle to re-parse the query and potentially can generate a different plan (and hence different performance).

Andy</description>
		<content:encoded><![CDATA[<p>Hi Stuart</p>
<p>Great post. The issue of stats on empty tables is well documented (<a href="https://metalink3.oracle.com/od/faces/secure/km/DocumentDisplay.jspx?id=478242.1&amp;h=Y" rel="nofollow" onclick="javascript:pageTracker._trackPageview('/outbound/comment/metalink3.oracle.com');">Alert 1162</a>) but not widely known in the Siebel community.</p>
<p>Another potential gotcha when debugging Siebel queries in TOAD is that people often substitute literals where Siebel Object Manager uses bind variables.</p>
<p>The presence of literals forces Oracle to re-parse the query and potentially can generate a different plan (and hence different performance).</p>
<p>Andy</p>
]]></content:encoded>
	</item>
</channel>
</rss>
