<?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: Analyze this</title>
	<atom:link href="http://jonathanlewis.wordpress.com/2010/03/31/analyze-this-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://jonathanlewis.wordpress.com/2010/03/31/analyze-this-2/</link>
	<description>Just another Oracle weblog</description>
	<lastBuildDate>Sat, 18 May 2013 11:04:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Blogroll Report 26/03 /2010 &#8211; 02/04/2010 &#171; Coskan&#8217;s Approach to Oracle</title>
		<link>http://jonathanlewis.wordpress.com/2010/03/31/analyze-this-2/#comment-36310</link>
		<dc:creator><![CDATA[Blogroll Report 26/03 /2010 &#8211; 02/04/2010 &#171; Coskan&#8217;s Approach to Oracle]]></dc:creator>
		<pubDate>Sun, 23 May 2010 22:21:34 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3423#comment-36310</guid>
		<description><![CDATA[[...] to use DBMS_STATS instead of analyze ? Jonathan Lewis-Analyze this Jonathan Lewis-Analyze this [...]]]></description>
		<content:encoded><![CDATA[<p>[...] to use DBMS_STATS instead of analyze ? Jonathan Lewis-Analyze this Jonathan Lewis-Analyze this [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jametong</title>
		<link>http://jonathanlewis.wordpress.com/2010/03/31/analyze-this-2/#comment-35974</link>
		<dc:creator><![CDATA[jametong]]></dc:creator>
		<pubDate>Sat, 03 Apr 2010 13:18:22 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3423#comment-35974</guid>
		<description><![CDATA[I do this test on my test db.
&lt;strong&gt;
os: Red Hat Enterprise Linux Server release 5.2 (Tikanga)
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
&lt;/strong&gt;
&lt;code&gt;
--After analyze
-------------------------------------------------------------------
&#124; Id  &#124; Operation          &#124; Name &#124; Rows  &#124; Bytes &#124;TempSpc&#124; Cost  &#124;
-------------------------------------------------------------------
&#124;   0 &#124; SELECT STATEMENT   &#124;      &#124; 10000 &#124;  3964K&#124;       &#124;   292 &#124;
&#124;*  1 &#124;  HASH JOIN         &#124;      &#124; 10000 &#124;  3964K&#124;  3506K&#124;   292 &#124;
&#124;   2 &#124;   TABLE ACCESS FULL&#124; T1   &#124; 10000 &#124;  1982K&#124;       &#124;    47 &#124;
&#124;   3 &#124;   TABLE ACCESS FULL&#124; T2   &#124; 10000 &#124;  1982K&#124;       &#124;    45 &#124;
-------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   1 - access(&quot;T1&quot;.&quot;ID&quot;=&quot;T2&quot;.&quot;ID&quot;)

Note
-----
   - cpu costing is off (consider enabling it)

--After using dbms_stats
-------------------------------------------------------------------
&#124; Id  &#124; Operation          &#124; Name &#124; Rows  &#124; Bytes &#124;TempSpc&#124; Cost  &#124;
-------------------------------------------------------------------
&#124;   0 &#124; SELECT STATEMENT   &#124;      &#124; 10000 &#124;  4189K&#124;       &#124;   308 &#124;
&#124;*  1 &#124;  HASH JOIN         &#124;      &#124; 10000 &#124;  4189K&#124;  3662K&#124;   308 &#124;
&#124;   2 &#124;   TABLE ACCESS FULL&#124; T2   &#124; 10000 &#124;  2001K&#124;       &#124;    45 &#124;
&#124;   3 &#124;   TABLE ACCESS FULL&#124; T1   &#124; 10000 &#124;  2187K&#124;       &#124;    47 &#124;
-------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   1 - access(&quot;T1&quot;.&quot;ID&quot;=&quot;T2&quot;.&quot;ID&quot;)

Note
-----
   - cpu costing is off (consider enabling it)
&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>I do this test on my test db.<br />
<strong><br />
os: Red Hat Enterprise Linux Server release 5.2 (Tikanga)<br />
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 &#8211; Production<br />
</strong><br />
<code><br />
--After analyze<br />
-------------------------------------------------------------------<br />
| Id  | Operation          | Name | Rows  | Bytes |TempSpc| Cost  |<br />
-------------------------------------------------------------------<br />
|   0 | SELECT STATEMENT   |      | 10000 |  3964K|       |   292 |<br />
|*  1 |  HASH JOIN         |      | 10000 |  3964K|  3506K|   292 |<br />
|   2 |   TABLE ACCESS FULL| T1   | 10000 |  1982K|       |    47 |<br />
|   3 |   TABLE ACCESS FULL| T2   | 10000 |  1982K|       |    45 |<br />
-------------------------------------------------------------------</p>
<p>Predicate Information (identified by operation id):<br />
---------------------------------------------------</p>
<p>   1 - access("T1"."ID"="T2"."ID")</p>
<p>Note<br />
-----<br />
   - cpu costing is off (consider enabling it)</p>
<p>--After using dbms_stats<br />
-------------------------------------------------------------------<br />
| Id  | Operation          | Name | Rows  | Bytes |TempSpc| Cost  |<br />
-------------------------------------------------------------------<br />
|   0 | SELECT STATEMENT   |      | 10000 |  4189K|       |   308 |<br />
|*  1 |  HASH JOIN         |      | 10000 |  4189K|  3662K|   308 |<br />
|   2 |   TABLE ACCESS FULL| T2   | 10000 |  2001K|       |    45 |<br />
|   3 |   TABLE ACCESS FULL| T1   | 10000 |  2187K|       |    47 |<br />
-------------------------------------------------------------------</p>
<p>Predicate Information (identified by operation id):<br />
---------------------------------------------------</p>
<p>   1 - access("T1"."ID"="T2"."ID")</p>
<p>Note<br />
-----<br />
   - cpu costing is off (consider enabling it)<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Analyze This &#8211; 2 &#171; Oracle Scratchpad</title>
		<link>http://jonathanlewis.wordpress.com/2010/03/31/analyze-this-2/#comment-35967</link>
		<dc:creator><![CDATA[Analyze This &#8211; 2 &#171; Oracle Scratchpad]]></dc:creator>
		<pubDate>Thu, 01 Apr 2010 20:00:14 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3423#comment-35967</guid>
		<description><![CDATA[[...] Statistics &#8212; Jonathan Lewis @ 7:58 pm UTC Apr 1,2010    If you&#8217;ve run the scripts from Analyze This, I hope you found that the query gave you two different execution plans. This is my output from the [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Statistics &#8212; Jonathan Lewis @ 7:58 pm UTC Apr 1,2010    If you&#8217;ve run the scripts from Analyze This, I hope you found that the query gave you two different execution plans. This is my output from the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flado</title>
		<link>http://jonathanlewis.wordpress.com/2010/03/31/analyze-this-2/#comment-35962</link>
		<dc:creator><![CDATA[Flado]]></dc:creator>
		<pubDate>Thu, 01 Apr 2010 08:50:27 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3423#comment-35962</guid>
		<description><![CDATA[ANALYZE is not counting the length bytes? 
The point being, bad statistics can have real, detrimental impact (in this case, slightly wrong hash join order) on execution plan quality even if we don&#039;t use CPU costing?
By the way, extent sizing policy (auto vs. 1M) and free space management (ASSM vs. freelist) didn&#039;t make any difference in my test (10.2.0.3 under RedHat).

Cheers,
Flado]]></description>
		<content:encoded><![CDATA[<p>ANALYZE is not counting the length bytes?<br />
The point being, bad statistics can have real, detrimental impact (in this case, slightly wrong hash join order) on execution plan quality even if we don&#8217;t use CPU costing?<br />
By the way, extent sizing policy (auto vs. 1M) and free space management (ASSM vs. freelist) didn&#8217;t make any difference in my test (10.2.0.3 under RedHat).</p>
<p>Cheers,<br />
Flado</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dhhb</title>
		<link>http://jonathanlewis.wordpress.com/2010/03/31/analyze-this-2/#comment-35956</link>
		<dc:creator><![CDATA[dhhb]]></dc:creator>
		<pubDate>Thu, 01 Apr 2010 06:08:07 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3423#comment-35956</guid>
		<description><![CDATA[I tested on my machine:

10.1.0.2.0 on Windows 32bit:

[sourcecode]
Analyze
----------------------------------------------------------                      
   0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=349 Card=10000 Bytes=4060000) 
   1    0   HASH JOIN (Cost=349 Card=10000 Bytes=4060000)
   2    1     TABLE ACCESS (FULL) OF &#039;T1&#039; (TABLE) (Cost=76 Card=10000 Bytes=2030000) 
   3    1     TABLE ACCESS (FULL) OF &#039;T2&#039; (TABLE) (Cost=73 Card=10000 Bytes=2030000)
                 
DBMS_STATS
----------------------------------------------------------                      
   0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=365 Card=10000 Bytes=4290000)
   1    0   HASH JOIN (Cost=365 Card=10000 Bytes=4290000)
   2    1     TABLE ACCESS (FULL) OF &#039;T2&#039; (TABLE) (Cost=73 Card=10000 Bytes=2050000)
   3    1     TABLE ACCESS (FULL) OF &#039;T1&#039; (TABLE) (Cost=76 Card=10000 Bytes=2240000)

[/sourcecode]
So looks like for analyze CBO will think the row length in the two tables are same but for DBMS_STATS will also consider the columns count, right?]]></description>
		<content:encoded><![CDATA[<p>I tested on my machine:</p>
<p>10.1.0.2.0 on Windows 32bit:</p>
<pre class="brush: plain; title: ; notranslate">
Analyze
----------------------------------------------------------                      
   0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=349 Card=10000 Bytes=4060000) 
   1    0   HASH JOIN (Cost=349 Card=10000 Bytes=4060000)
   2    1     TABLE ACCESS (FULL) OF 'T1' (TABLE) (Cost=76 Card=10000 Bytes=2030000) 
   3    1     TABLE ACCESS (FULL) OF 'T2' (TABLE) (Cost=73 Card=10000 Bytes=2030000)
                 
DBMS_STATS
----------------------------------------------------------                      
   0      SELECT STATEMENT Optimizer=ALL_ROWS (Cost=365 Card=10000 Bytes=4290000)
   1    0   HASH JOIN (Cost=365 Card=10000 Bytes=4290000)
   2    1     TABLE ACCESS (FULL) OF 'T2' (TABLE) (Cost=73 Card=10000 Bytes=2050000)
   3    1     TABLE ACCESS (FULL) OF 'T1' (TABLE) (Cost=76 Card=10000 Bytes=2240000)

</pre>
<p>So looks like for analyze CBO will think the row length in the two tables are same but for DBMS_STATS will also consider the columns count, right?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Lewis</title>
		<link>http://jonathanlewis.wordpress.com/2010/03/31/analyze-this-2/#comment-35951</link>
		<dc:creator><![CDATA[Jonathan Lewis]]></dc:creator>
		<pubDate>Wed, 31 Mar 2010 21:35:43 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3423#comment-35951</guid>
		<description><![CDATA[Colin,

Read the first sentence - and then ask yourself what point I might have been trying to make a few years ago.]]></description>
		<content:encoded><![CDATA[<p>Colin,</p>
<p>Read the first sentence &#8211; and then ask yourself what point I might have been trying to make a few years ago.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Colin 't Hart</title>
		<link>http://jonathanlewis.wordpress.com/2010/03/31/analyze-this-2/#comment-35950</link>
		<dc:creator><![CDATA[Colin 't Hart]]></dc:creator>
		<pubDate>Wed, 31 Mar 2010 21:01:14 +0000</pubDate>
		<guid isPermaLink="false">http://jonathanlewis.wordpress.com/?p=3423#comment-35950</guid>
		<description><![CDATA[Isn&#039;t the analyze command deprecated for gathering stats for the CBO?]]></description>
		<content:encoded><![CDATA[<p>Isn&#8217;t the analyze command deprecated for gathering stats for the CBO?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
