<?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: First Table is 550MB, Second Table is 26GB &#8211; Nested Loops or Full Table Scan?</title>
	<atom:link href="http://hoopercharles.wordpress.com/2010/10/01/first-table-is-550mb-second-table-is-26gb-nested-loops-or-full-table-scan/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoopercharles.wordpress.com/2010/10/01/first-table-is-550mb-second-table-is-26gb-nested-loops-or-full-table-scan/</link>
	<description>Miscellaneous Random Oracle Topics: Stop, Think, ... Understand</description>
	<lastBuildDate>Mon, 13 May 2013 14:10:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/10/01/first-table-is-550mb-second-table-is-26gb-nested-loops-or-full-table-scan/#comment-1936</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Sat, 02 Oct 2010 19:29:48 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=3384#comment-1936</guid>
		<description><![CDATA[Another great suggestion for what could cause a change from hash joins to nested loops joins (or nested loops joins to hash joins).  I might have to see what happens when experimenting with different system (CPU) statistics.  Thank you for the suggestion.]]></description>
		<content:encoded><![CDATA[<p>Another great suggestion for what could cause a change from hash joins to nested loops joins (or nested loops joins to hash joins).  I might have to see what happens when experimenting with different system (CPU) statistics.  Thank you for the suggestion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan-Marten Spit</title>
		<link>http://hoopercharles.wordpress.com/2010/10/01/first-table-is-550mb-second-table-is-26gb-nested-loops-or-full-table-scan/#comment-1932</link>
		<dc:creator><![CDATA[Jan-Marten Spit]]></dc:creator>
		<pubDate>Sat, 02 Oct 2010 18:27:39 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=3384#comment-1932</guid>
		<description><![CDATA[also, the value of sreadtim (random io) and mreadtim (multiblock io) as well as mbrc from sys.aux_stats$ (&#039;system statistics&#039;) play a role here.]]></description>
		<content:encoded><![CDATA[<p>also, the value of sreadtim (random io) and mreadtim (multiblock io) as well as mbrc from sys.aux_stats$ (&#8216;system statistics&#8217;) play a role here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/10/01/first-table-is-550mb-second-table-is-26gb-nested-loops-or-full-table-scan/#comment-1915</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Fri, 01 Oct 2010 18:36:16 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=3384#comment-1915</guid>
		<description><![CDATA[Andreas,

Another worthy to mention item that could impact the results of the test case, and another one that did not immediately come to mind when I wrote the blog article.  For the Oracle instance used in this blog article:
[code]
SQL&gt; SHOW PARAMETER OPTIMIZER_MODE
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- --------
optimizer_mode                       string      ALL_ROWS
[/code]

We could then extend your idea a little to say that introducing ROWNUM into the WHERE clause of the test case script&#039;s SQL statements could also lead to a similar results, see:
http://jonathanlewis.wordpress.com/2010/09/30/rownum-effects-2/
http://hoopercharles.wordpress.com/2009/12/09/sql-%e2%80%93-bad-execution-plan-caused-by-rownum-row_number-is-possible-fix/

Any other ideas regarding what we should test in this test case?]]></description>
		<content:encoded><![CDATA[<p>Andreas,</p>
<p>Another worthy to mention item that could impact the results of the test case, and another one that did not immediately come to mind when I wrote the blog article.  For the Oracle instance used in this blog article:</p>
<pre class="brush: plain; title: ; notranslate">
SQL&gt; SHOW PARAMETER OPTIMIZER_MODE
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- --------
optimizer_mode                       string      ALL_ROWS
</pre>
<p>We could then extend your idea a little to say that introducing ROWNUM into the WHERE clause of the test case script&#8217;s SQL statements could also lead to a similar results, see:<br />
<a href="http://jonathanlewis.wordpress.com/2010/09/30/rownum-effects-2/" rel="nofollow">http://jonathanlewis.wordpress.com/2010/09/30/rownum-effects-2/</a><br />
<a href="http://hoopercharles.wordpress.com/2009/12/09/sql-%e2%80%93-bad-execution-plan-caused-by-rownum-row_number-is-possible-fix/" rel="nofollow">http://hoopercharles.wordpress.com/2009/12/09/sql-%e2%80%93-bad-execution-plan-caused-by-rownum-row_number-is-possible-fix/</a></p>
<p>Any other ideas regarding what we should test in this test case?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas Buckenhofer</title>
		<link>http://hoopercharles.wordpress.com/2010/10/01/first-table-is-550mb-second-table-is-26gb-nested-loops-or-full-table-scan/#comment-1914</link>
		<dc:creator><![CDATA[Andreas Buckenhofer]]></dc:creator>
		<pubDate>Fri, 01 Oct 2010 18:21:36 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=3384#comment-1914</guid>
		<description><![CDATA[Charles, I could imagine that optimizing for first rows instead of all rows could favour nested loops compared to hash joins.]]></description>
		<content:encoded><![CDATA[<p>Charles, I could imagine that optimizing for first rows instead of all rows could favour nested loops compared to hash joins.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2010/10/01/first-table-is-550mb-second-table-is-26gb-nested-loops-or-full-table-scan/#comment-1912</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Fri, 01 Oct 2010 15:13:52 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=3384#comment-1912</guid>
		<description><![CDATA[Hemant,

Thank you for suggesting another item that could affect the test case results, and another item to consider if we were trying to help the original poster in the OTN thread.  For the Oracle instance used in this blog article:
[code]
SQL&gt; show parameter pga
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- -----
pga_aggregate_target                 big integer 400M
[/code]

I mentioned the size of the table, or more specifically the column descriptions for a couple of reasons.  One of those reasons is how the AVG_ROW_LEN for the table affects the costing of an access path (page 11 seems to show its use: http://www.centrexcc.com/A%20Look%20under%20the%20Hood%20of%20CBO%20-%20the%2010053%20Event.pdf - but there are probably more recent articles) - should we full table scan or index range scan to access the table data.  Another reason I mentioned the size of the tables, or more accurately the size of the selected columns, is how much data will be supplied as input to the next operation in the plan - that likely is not an issue demonstrated in my simple test case script.

Getting back to your point, what if the join column was a 100 byte VARCHAR2 column rather than a numeric column, or multiple columns totalling an average of 200 bytes were the join condition.  As you state, the amount of memory available for storing the hash table is an important consideration.]]></description>
		<content:encoded><![CDATA[<p>Hemant,</p>
<p>Thank you for suggesting another item that could affect the test case results, and another item to consider if we were trying to help the original poster in the OTN thread.  For the Oracle instance used in this blog article:</p>
<pre class="brush: plain; title: ; notranslate">
SQL&gt; show parameter pga
 
NAME                                 TYPE        VALUE
------------------------------------ ----------- -----
pga_aggregate_target                 big integer 400M
</pre>
<p>I mentioned the size of the table, or more specifically the column descriptions for a couple of reasons.  One of those reasons is how the AVG_ROW_LEN for the table affects the costing of an access path (page 11 seems to show its use: <a href="http://www.centrexcc.com/A%20Look%20under%20the%20Hood%20of%20CBO%20-%20the%2010053%20Event.pdf" rel="nofollow">http://www.centrexcc.com/A%20Look%20under%20the%20Hood%20of%20CBO%20-%20the%2010053%20Event.pdf</a> &#8211; but there are probably more recent articles) &#8211; should we full table scan or index range scan to access the table data.  Another reason I mentioned the size of the tables, or more accurately the size of the selected columns, is how much data will be supplied as input to the next operation in the plan &#8211; that likely is not an issue demonstrated in my simple test case script.</p>
<p>Getting back to your point, what if the join column was a 100 byte VARCHAR2 column rather than a numeric column, or multiple columns totalling an average of 200 bytes were the join condition.  As you state, the amount of memory available for storing the hash table is an important consideration.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hemant K Chitale</title>
		<link>http://hoopercharles.wordpress.com/2010/10/01/first-table-is-550mb-second-table-is-26gb-nested-loops-or-full-table-scan/#comment-1911</link>
		<dc:creator><![CDATA[Hemant K Chitale]]></dc:creator>
		<pubDate>Fri, 01 Oct 2010 14:12:40 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=3384#comment-1911</guid>
		<description><![CDATA[Oracle wouldn&#039;t be considering the sizes of the tables per se,  but the sizes of HashAreas.]]></description>
		<content:encoded><![CDATA[<p>Oracle wouldn&#8217;t be considering the sizes of the tables per se,  but the sizes of HashAreas.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
