<?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/"
		>
<channel>
	<title>Comments on: Does CREATE INDEX Gather Global Statistics?</title>
	<atom:link href="http://www.antognini.ch/2009/12/does-create-index-gather-global-statistics/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.antognini.ch/2009/12/does-create-index-gather-global-statistics/</link>
	<description></description>
	<lastBuildDate>Thu, 17 May 2012 06:56:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: Christian Antognini</title>
		<link>http://www.antognini.ch/2009/12/does-create-index-gather-global-statistics/#comment-311</link>
		<dc:creator>Christian Antognini</dc:creator>
		<pubDate>Wed, 21 Mar 2012 06:50:59 +0000</pubDate>
		<guid isPermaLink="false">http://antognini.ch/?p=792#comment-311</guid>
		<description>Hi Mohamed

&gt; Would collecting table statistics not enough?

If the default value of the CASCADE parameter is TRUE, executing GATHER_TABLE_STATS gathers the statistics for both the table and the index. Hence, it might be enough. Be careful, however, that also partition-level statistics are re-gathered. So, it depends what do you want to achieve and how much time you have to do it...

HTH
Chris</description>
		<content:encoded><![CDATA[<p>Hi Mohamed</p>
<p>> Would collecting table statistics not enough?</p>
<p>If the default value of the CASCADE parameter is TRUE, executing GATHER_TABLE_STATS gathers the statistics for both the table and the index. Hence, it might be enough. Be careful, however, that also partition-level statistics are re-gathered. So, it depends what do you want to achieve and how much time you have to do it&#8230;</p>
<p>HTH<br />
Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mohamed Houri</title>
		<link>http://www.antognini.ch/2009/12/does-create-index-gather-global-statistics/#comment-310</link>
		<dc:creator>Mohamed Houri</dc:creator>
		<pubDate>Tue, 13 Mar 2012 14:59:13 +0000</pubDate>
		<guid isPermaLink="false">http://antognini.ch/?p=792#comment-310</guid>
		<description>Hi Christian

I know this is an old post but I was wondering if we really need to manually gather global level index statistics. Would collecting table statistics not enough?

sql&gt; CREATE TABLE t5 (n1 number, n2 number)
  2      PARTITION BY RANGE (n1) (
  3        PARTITION p1 VALUES LESS THAN (11),
  4        PARTITION p2 VALUES LESS THAN (21)
  5      );

Table created.

sql&gt;&gt; INSERT INTO t5
  2      SELECT rownum, rownum
  3      FROM dual
  4      connect by level  commit;

Commit complete.

sql&gt; CREATE INDEX i ON t5 (n2) LOCAL;

Index created.

sql&gt; SELECT partition_name, global_stats, distinct_keys
  2      FROM user_ind_statistics
  3      WHERE index_name = &#039;I&#039;;

PARTITION_NAME                 GLO DISTINCT_KEYS
------------------------------ --- -------------
                               NO             10
P1                             NO             10
P2                             NO             10

sql&gt; exec dbms_stats.gather_table_stats(user, &#039;T5&#039;);

PL/SQL procedure successfully completed.

sql&gt;&gt; SELECT partition_name, global_stats, distinct_keys
  2      FROM user_ind_statistics
  3      WHERE index_name = &#039;I&#039;;

PARTITION_NAME                 GLO DISTINCT_KEYS
------------------------------ --- -------------
                               YES            20
P1                             YES            10
P2                             YES            10

Best regards

Mohamed Houri</description>
		<content:encoded><![CDATA[<p>Hi Christian</p>
<p>I know this is an old post but I was wondering if we really need to manually gather global level index statistics. Would collecting table statistics not enough?</p>
<p>sql&gt; CREATE TABLE t5 (n1 number, n2 number)<br />
  2      PARTITION BY RANGE (n1) (<br />
  3        PARTITION p1 VALUES LESS THAN (11),<br />
  4        PARTITION p2 VALUES LESS THAN (21)<br />
  5      );</p>
<p>Table created.</p>
<p>sql&gt;&gt; INSERT INTO t5<br />
  2      SELECT rownum, rownum<br />
  3      FROM dual<br />
  4      connect by level  commit;</p>
<p>Commit complete.</p>
<p>sql&gt; CREATE INDEX i ON t5 (n2) LOCAL;</p>
<p>Index created.</p>
<p>sql&gt; SELECT partition_name, global_stats, distinct_keys<br />
  2      FROM user_ind_statistics<br />
  3      WHERE index_name = &#8216;I&#8217;;</p>
<p>PARTITION_NAME                 GLO DISTINCT_KEYS<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212; &#8212;&#8212;&#8212;&#8212;-<br />
                               NO             10<br />
P1                             NO             10<br />
P2                             NO             10</p>
<p>sql&gt; exec dbms_stats.gather_table_stats(user, &#8216;T5&#8242;);</p>
<p>PL/SQL procedure successfully completed.</p>
<p>sql&gt;&gt; SELECT partition_name, global_stats, distinct_keys<br />
  2      FROM user_ind_statistics<br />
  3      WHERE index_name = &#8216;I&#8217;;</p>
<p>PARTITION_NAME                 GLO DISTINCT_KEYS<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212; &#8212;&#8212;&#8212;&#8212;-<br />
                               YES            20<br />
P1                             YES            10<br />
P2                             YES            10</p>
<p>Best regards</p>
<p>Mohamed Houri</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blogroll Report 11/12/2009-18/12/2009 &#171; Coskan&#8217;s Approach to Oracle</title>
		<link>http://www.antognini.ch/2009/12/does-create-index-gather-global-statistics/#comment-309</link>
		<dc:creator>Blogroll Report 11/12/2009-18/12/2009 &#171; Coskan&#8217;s Approach to Oracle</dc:creator>
		<pubDate>Sat, 02 Jan 2010 17:50:38 +0000</pubDate>
		<guid isPermaLink="false">http://antognini.ch/?p=792#comment-309</guid>
		<description>[...] 16-Auto stats gathering of index creation operation is not working for global statistics on partitioned indexes Christian Antognini-Does create index gather global statistics? [...] </description>
		<content:encoded><![CDATA[<p>[...] 16-Auto stats gathering of index creation operation is not working for global statistics on partitioned indexes Christian Antognini-Does create index gather global statistics? [...] </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Albertian</title>
		<link>http://www.antognini.ch/2009/12/does-create-index-gather-global-statistics/#comment-308</link>
		<dc:creator>Albertian</dc:creator>
		<pubDate>Fri, 18 Dec 2009 08:05:30 +0000</pubDate>
		<guid isPermaLink="false">http://antognini.ch/?p=792#comment-308</guid>
		<description>Thanks for this information!</description>
		<content:encoded><![CDATA[<p>Thanks for this information!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

