<?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 Costing 1 &#8211; What is Wrong with this Quote?</title>
	<atom:link href="http://hoopercharles.wordpress.com/2010/12/05/optimizer-costing-1-what-is-wrong-with-this-quote/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoopercharles.wordpress.com/2010/12/05/optimizer-costing-1-what-is-wrong-with-this-quote/</link>
	<description>Miscellaneous Random Oracle Topics: Stop, Think, ... Understand</description>
	<lastBuildDate>Thu, 23 May 2013 04:02:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Chris Saxon</title>
		<link>http://hoopercharles.wordpress.com/2010/12/05/optimizer-costing-1-what-is-wrong-with-this-quote/#comment-2300</link>
		<dc:creator><![CDATA[Chris Saxon]]></dc:creator>
		<pubDate>Tue, 07 Dec 2010 22:02:28 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=3836#comment-2300</guid>
		<description><![CDATA[I feel that the quotes have some items slightly back-to-front.

As I understand it, the optimizer calculates the CPU and I/O costs for the possible methods of accessing the requested data, then chooses the access path with the lowest cost. Therefore costing is always &quot;significant&quot; as even small changes in cost could cause an execution plan to change, if the original costs were similar.

The all_rows and first_rows hints are instructions to optimize for fetching all the data or just the first (n) rows respectively. Fetching all the data in a set is likely to have a higher cost, as more work is done compared to returning just n rows. Whether this makes the cost more &quot;noteworthy&quot; is debatable. If my above understanding is correct, the cost is always calculated relative to the other access methods for a given environment. Therefore you cannot directly compare the costs for first_rows vs all_rows for a given statement, as these changes to the environment affect how the CBO makes it&#039;s decision and therefore which plan it chooses.]]></description>
		<content:encoded><![CDATA[<p>I feel that the quotes have some items slightly back-to-front.</p>
<p>As I understand it, the optimizer calculates the CPU and I/O costs for the possible methods of accessing the requested data, then chooses the access path with the lowest cost. Therefore costing is always &#8220;significant&#8221; as even small changes in cost could cause an execution plan to change, if the original costs were similar.</p>
<p>The all_rows and first_rows hints are instructions to optimize for fetching all the data or just the first (n) rows respectively. Fetching all the data in a set is likely to have a higher cost, as more work is done compared to returning just n rows. Whether this makes the cost more &#8220;noteworthy&#8221; is debatable. If my above understanding is correct, the cost is always calculated relative to the other access methods for a given environment. Therefore you cannot directly compare the costs for first_rows vs all_rows for a given statement, as these changes to the environment affect how the CBO makes it&#8217;s decision and therefore which plan it chooses.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/12/05/optimizer-costing-1-what-is-wrong-with-this-quote/#comment-2263</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Mon, 06 Dec 2010 11:23:54 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=3836#comment-2263</guid>
		<description><![CDATA[I might not have included enough text from the book.  I tried to help clarify the context of the quote.  Note that under the heading &quot;CPU Based Optimizer Costing&quot;, the book states that this feature is controlled by the _OPTIMIZER_COST_MODEL hidden parameter.]]></description>
		<content:encoded><![CDATA[<p>I might not have included enough text from the book.  I tried to help clarify the context of the quote.  Note that under the heading &#8220;CPU Based Optimizer Costing&#8221;, the book states that this feature is controlled by the _OPTIMIZER_COST_MODEL hidden parameter.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
