<?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: Optimizer_index_cost_adj</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2006/10/24/optimizer_index_cost_adj/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2006/10/24/optimizer_index_cost_adj/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Thu, 23 May 2013 12:47:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Ben Prusinski</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/24/optimizer_index_cost_adj/#comment-31006</link>
		<dc:creator><![CDATA[Ben Prusinski]]></dc:creator>
		<pubDate>Mon, 12 May 2008 01:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/24/optimizer_index_cost_adj/#comment-31006</guid>
		<description><![CDATA[Jonathan,

Thank you for the insight into tuning this parameter- I agree and Metalink is not always 100% correct.
Like you said in your new book never believe everything that you read. Alas many folks take a so called Oracle expert as gospel without testing things out. 

Right now, I am testing out values with this and a few other settings for test and development systems first to see if any side effects occur. By the way, I am enjoying your Oracle Cost Optimizer book- very mathematical but interesting insights. I can tell that you have a solid math background :-)

And yes- the SQL queries have a lot of poorly written subqueries with IN and OR lists as well as poorly designed join conditions. 

By the way, I am writing a book as well but on database migrations to Oracle. Even though I am more a DBA than a developer, I enjoy learning the ins and outs on database design and how the optimizer really works.

I can appreciate the time and effort required to write a quality technology book.


Cheers,
Ben Prusinski]]></description>
		<content:encoded><![CDATA[<p>Jonathan,</p>
<p>Thank you for the insight into tuning this parameter- I agree and Metalink is not always 100% correct.<br />
Like you said in your new book never believe everything that you read. Alas many folks take a so called Oracle expert as gospel without testing things out. </p>
<p>Right now, I am testing out values with this and a few other settings for test and development systems first to see if any side effects occur. By the way, I am enjoying your Oracle Cost Optimizer book- very mathematical but interesting insights. I can tell that you have a solid math background :-)</p>
<p>And yes- the SQL queries have a lot of poorly written subqueries with IN and OR lists as well as poorly designed join conditions. </p>
<p>By the way, I am writing a book as well but on database migrations to Oracle. Even though I am more a DBA than a developer, I enjoy learning the ins and outs on database design and how the optimizer really works.</p>
<p>I can appreciate the time and effort required to write a quality technology book.</p>
<p>Cheers,<br />
Ben Prusinski</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/24/optimizer_index_cost_adj/#comment-30936</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Fri, 02 May 2008 13:36:46 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/24/optimizer_index_cost_adj/#comment-30936</guid>
		<description><![CDATA[Ben,

I&#039;ve just read the note - and didn&#039;t really like it. What it demonstrates isn&#039;t really &lt;em&gt;&quot;tuning&quot;&lt;/em&gt; a parameter, it&#039;s fiddlnig with it until one particulary query does what you want.

Admittedly, it&#039;s quite simple in their example to calculate a suitable value - but as the final comment states, they&#039;re just demonstrating the impact of fixing one query using one particular index. 

I think the note is more about demonstrating the impact of the parameter, rather than trying to tell you how to pick a value.

If you&#039;re not using system statistics (CPU costing) then the numbers you need should be designed to help the optimizer understand the speed at which Oracle can get data off disk.

Ideally you need to use something like Orion (the Oracle tool) or iozone to find out the relative speeds of (the equivalent of) your single block and multiblock I/O read sizes, then set optimizer_index_cost_adj to 100 * &quot;single block read time&quot; / &quot;multiblock read time&quot;.

For a typical OLTP setup, a value in the region of 30 is likely to be fairly reasonable - though a full regression test is needed to discover if you&#039;re going to get any catastrophic side effects.

In your case the problem is much more likely to relate to bad cardinality estimates, particularly caused by correlated subqueries and IN list. See for example &lt;em&gt;&lt;strong&gt;&lt;a href=&quot;http://jonathanlewis.wordpress.com/2006/11/08/subquery-selectivity/&quot; rel=&quot;nofollow&quot;&gt;this note&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt; on the &quot;5%&quot; effect of certain types of subquery. Another source of problems is mixing &lt;em&gt;&lt;strong&gt;&lt;a href=&quot;http://jonathanlewis.wordpress.com/2007/02/26/subquery-with-or/&quot; rel=&quot;nofollow&quot;&gt;subqueries with ORs&lt;/a&gt;&lt;/strong&gt;&lt;/em&gt;.
]]></description>
		<content:encoded><![CDATA[<p>Ben,</p>
<p>I&#8217;ve just read the note &#8211; and didn&#8217;t really like it. What it demonstrates isn&#8217;t really <em>&#8220;tuning&#8221;</em> a parameter, it&#8217;s fiddlnig with it until one particulary query does what you want.</p>
<p>Admittedly, it&#8217;s quite simple in their example to calculate a suitable value &#8211; but as the final comment states, they&#8217;re just demonstrating the impact of fixing one query using one particular index. </p>
<p>I think the note is more about demonstrating the impact of the parameter, rather than trying to tell you how to pick a value.</p>
<p>If you&#8217;re not using system statistics (CPU costing) then the numbers you need should be designed to help the optimizer understand the speed at which Oracle can get data off disk.</p>
<p>Ideally you need to use something like Orion (the Oracle tool) or iozone to find out the relative speeds of (the equivalent of) your single block and multiblock I/O read sizes, then set optimizer_index_cost_adj to 100 * &#8220;single block read time&#8221; / &#8220;multiblock read time&#8221;.</p>
<p>For a typical OLTP setup, a value in the region of 30 is likely to be fairly reasonable &#8211; though a full regression test is needed to discover if you&#8217;re going to get any catastrophic side effects.</p>
<p>In your case the problem is much more likely to relate to bad cardinality estimates, particularly caused by correlated subqueries and IN list. See for example <em><strong><a href="http://jonathanlewis.wordpress.com/2006/11/08/subquery-selectivity/" rel="nofollow">this note</a></strong></em> on the &#8220;5%&#8221; effect of certain types of subquery. Another source of problems is mixing <em><strong><a href="http://jonathanlewis.wordpress.com/2007/02/26/subquery-with-or/" rel="nofollow">subqueries with ORs</a></strong></em>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben Prusinski</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/24/optimizer_index_cost_adj/#comment-30921</link>
		<dc:creator><![CDATA[Ben Prusinski]]></dc:creator>
		<pubDate>Wed, 30 Apr 2008 17:25:20 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/24/optimizer_index_cost_adj/#comment-30921</guid>
		<description><![CDATA[Hello Jonathan:

So if I have a lot of SQL queries that are using correlated subqueries with many table joins that also have IN conditions, would it benefit me to tune this parameter to optimize my SQL query performance? I read about tuning this parameter per Metalink Note 243269.1 and was wondering how high of a value I would want to set this to with these type of poorly tuned complex queries.

Thanks
Ben Prusinski]]></description>
		<content:encoded><![CDATA[<p>Hello Jonathan:</p>
<p>So if I have a lot of SQL queries that are using correlated subqueries with many table joins that also have IN conditions, would it benefit me to tune this parameter to optimize my SQL query performance? I read about tuning this parameter per Metalink Note 243269.1 and was wondering how high of a value I would want to set this to with these type of poorly tuned complex queries.</p>
<p>Thanks<br />
Ben Prusinski</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/24/optimizer_index_cost_adj/#comment-2783</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Sun, 28 Jan 2007 13:42:54 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/24/optimizer_index_cost_adj/#comment-2783</guid>
		<description><![CDATA[I&#039;ve just been browsing my website, and realised that there was a relevant note about CPU costing that could be read in conjunction with the above, see:
http://www.jlcomp.demon.co.uk/system_stats.html]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve just been browsing my website, and realised that there was a relevant note about CPU costing that could be read in conjunction with the above, see:<br />
<a href="http://www.jlcomp.demon.co.uk/system_stats.html" rel="nofollow">http://www.jlcomp.demon.co.uk/system_stats.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mapgirl</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/24/optimizer_index_cost_adj/#comment-13</link>
		<dc:creator><![CDATA[mapgirl]]></dc:creator>
		<pubDate>Mon, 30 Oct 2006 15:49:22 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/24/optimizer_index_cost_adj/#comment-13</guid>
		<description><![CDATA[I&#039;m an Oracle newbie, but I&#039;m so excited you have a blog now. I read TKyte and Oracle Sponge all the time. I just picked up your CBO Fundementals book and have found it very useful for the work I&#039;m doing.

Thanks!]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m an Oracle newbie, but I&#8217;m so excited you have a blog now. I read TKyte and Oracle Sponge all the time. I just picked up your CBO Fundementals book and have found it very useful for the work I&#8217;m doing.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/24/optimizer_index_cost_adj/#comment-5</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Mon, 30 Oct 2006 07:12:47 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/24/optimizer_index_cost_adj/#comment-5</guid>
		<description><![CDATA[RE: David Aldridge / Optimizer_index_caching.

Correct - &lt;b&gt;optimizer_index_caching&lt;/b&gt; indicates the percentage of index blocks that WILL be cached; &lt;b&gt;optimizer_index_cost_adj&lt;/b&gt; indicates the percentage of table blocks that will NOT be cached.

Of course, &lt;b&gt;optimizer_index_caching&lt;/b&gt; applies only to branch blocks and only for &lt;b&gt;nested loop joins&lt;/b&gt; and &lt;b&gt;in list iterators&lt;/b&gt; and, at the end of the day, it&#039;s just a number for which we invent a meaning.]]></description>
		<content:encoded><![CDATA[<p>RE: David Aldridge / Optimizer_index_caching.</p>
<p>Correct &#8211; <b>optimizer_index_caching</b> indicates the percentage of index blocks that WILL be cached; <b>optimizer_index_cost_adj</b> indicates the percentage of table blocks that will NOT be cached.</p>
<p>Of course, <b>optimizer_index_caching</b> applies only to branch blocks and only for <b>nested loop joins</b> and <b>in list iterators</b> and, at the end of the day, it&#8217;s just a number for which we invent a meaning.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Aldridge</title>
		<link>http://jonathanlewis.wordpress.com/2006/10/24/optimizer_index_cost_adj/#comment-4</link>
		<dc:creator><![CDATA[David Aldridge]]></dc:creator>
		<pubDate>Mon, 30 Oct 2006 03:28:13 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/2006/10/24/optimizer_index_cost_adj/#comment-4</guid>
		<description><![CDATA[Hmmm, so in a sense it becomes complementary to the optimizer_index_caching parameter, being inversely related to table block caching rather than directly related to index caching?]]></description>
		<content:encoded><![CDATA[<p>Hmmm, so in a sense it becomes complementary to the optimizer_index_caching parameter, being inversely related to table block caching rather than directly related to index caching?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
