<?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: Oracle 11g: Extended Statistics</title>
	<atom:link href="http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/feed/" rel="self" type="application/rss+xml" />
	<link>http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/</link>
	<description>Oracle Database Performance And Scalability Blog</description>
	<lastBuildDate>Mon, 01 Mar 2010 22:11:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kerry Osborne&#8217;s Oracle Blog &#187; Blog Archive I&#8217;ll Gladly Pay You Tuesday for a Hamburger Today - Kerry Osborne’s Oracle Blog</title>
		<link>http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/comment-page-1/#comment-60</link>
		<dc:creator>Kerry Osborne&#8217;s Oracle Blog &#187; Blog Archive I&#8217;ll Gladly Pay You Tuesday for a Hamburger Today - Kerry Osborne’s Oracle Blog</dc:creator>
		<pubDate>Thu, 21 May 2009 00:31:44 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/#comment-60</guid>
		<description>[...] So the short term fix worked. The statements picked up the correct plans after re-parsing. Now let&#8217;s talk about the long term fix. Why did the partition not have stats on it? Turns out the partitioning scheme in place was range by date with a new partition for each week. Each partition goes from Thursday through the following Wednesday. Several partitions had been created in advance but as you may have guessed by now, nothing was done about the stats. Meaning that the partitions had values of 0 for the number of rows. Since the gather stats job was kicking in every evening, a whole days worth of data could be loaded into the partition before the stats would be updated. So that means that 24 hours worth of activity would occur with &#8220;bad&#8221; stats every week. Couple that with the default of NO_INVALIDATE=TRUE on the stats gathering and you get statements that may hang around for extended periods of time, even if the stats change dramatically (0 rows to a few million is dramatic, right?). So we manually set the stats on the pre-created partitions using a combination of dbms_stats.copy_table_stats and dbms_stats.set_table_stats and dbms_stats.set_column_stats (see Dion Cho&#8217;s excellent post for details and example code - and also this post on the Optimizermagic Blog for further info). I should also mention that Greg Rahn has several good posts on 11g Statistics Enhancements here, here, and here. [...]</description>
		<content:encoded><![CDATA[<p>[...] So the short term fix worked. The statements picked up the correct plans after re-parsing. Now let&#8217;s talk about the long term fix. Why did the partition not have stats on it? Turns out the partitioning scheme in place was range by date with a new partition for each week. Each partition goes from Thursday through the following Wednesday. Several partitions had been created in advance but as you may have guessed by now, nothing was done about the stats. Meaning that the partitions had values of 0 for the number of rows. Since the gather stats job was kicking in every evening, a whole days worth of data could be loaded into the partition before the stats would be updated. So that means that 24 hours worth of activity would occur with &#8220;bad&#8221; stats every week. Couple that with the default of NO_INVALIDATE=TRUE on the stats gathering and you get statements that may hang around for extended periods of time, even if the stats change dramatically (0 rows to a few million is dramatic, right?). So we manually set the stats on the pre-created partitions using a combination of dbms_stats.copy_table_stats and dbms_stats.set_table_stats and dbms_stats.set_column_stats (see Dion Cho&#8217;s excellent post for details and example code &#8211; and also this post on the Optimizermagic Blog for further info). I should also mention that Greg Rahn has several good posts on 11g Statistics Enhancements here, here, and here. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Virtual Columns &#171; Oracle Scratchpad</title>
		<link>http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/comment-page-1/#comment-61</link>
		<dc:creator>Virtual Columns &#171; Oracle Scratchpad</dc:creator>
		<pubDate>Thu, 16 Apr 2009 21:47:08 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/#comment-61</guid>
		<description>[...] without such as (sal + nvl(comm,0)) without creating a virtual column by making a call to dbms_stats.create_extended_stats(). But this will create exactly the same hidden virtual column that you would have had anyway, with [...]</description>
		<content:encoded><![CDATA[<p>[...] without such as (sal + nvl(comm,0)) without creating a virtual column by making a call to dbms_stats.create_extended_stats(). But this will create exactly the same hidden virtual column that you would have had anyway, with [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Correlation, nocorrelation and extended stats &#171; Oracle database internals by Riyaj</title>
		<link>http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/comment-page-1/#comment-53</link>
		<dc:creator>Correlation, nocorrelation and extended stats &#171; Oracle database internals by Riyaj</dc:creator>
		<pubDate>Fri, 19 Dec 2008 00:05:57 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/#comment-53</guid>
		<description>[...] zodiac sign and birth date in his Script. [ You can read his blog entry about extended statistics here ]. I used that script to create tables, populate data, etc and I will quickly jump to the [...]</description>
		<content:encoded><![CDATA[<p>[...] zodiac sign and birth date in his Script. [ You can read his blog entry about extended statistics here ]. I used that script to create tables, populate data, etc and I will quickly jump to the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Rahn</title>
		<link>http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/comment-page-1/#comment-59</link>
		<dc:creator>Greg Rahn</dc:creator>
		<pubDate>Sat, 25 Oct 2008 16:45:30 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/#comment-59</guid>
		<description>@Jean
I&#039;ve only run it against generated data.</description>
		<content:encoded><![CDATA[<p>@Jean<br />
I&#8217;ve only run it against generated data.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jean</title>
		<link>http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/comment-page-1/#comment-58</link>
		<dc:creator>Jean</dc:creator>
		<pubDate>Sat, 25 Oct 2008 06:07:01 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/#comment-58</guid>
		<description>has this very beautiful code ever been run against any real datasets? do we know if any sign(s) has a significantly larger no. of births? just curious.</description>
		<content:encoded><![CDATA[<p>has this very beautiful code ever been run against any real datasets? do we know if any sign(s) has a significantly larger no. of births? just curious.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Rahn</title>
		<link>http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/comment-page-1/#comment-54</link>
		<dc:creator>Greg Rahn</dc:creator>
		<pubDate>Fri, 24 Oct 2008 18:33:27 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/#comment-54</guid>
		<description>You can download an archive of the scripts &lt;a href=&quot;http://structureddata.org/files/zodiac_demo.tgz&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>You can download an archive of the scripts <a href="http://structureddata.org/files/zodiac_demo.tgz" rel="nofollow">here</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yoav</title>
		<link>http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/comment-page-1/#comment-57</link>
		<dc:creator>Yoav</dc:creator>
		<pubDate>Thu, 16 Oct 2008 12:05:40 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/#comment-57</guid>
		<description>Hi Greg,
Great example.
&quot;The CALENDAR table has 365 rows, one row for every day of the calendar year. The PERSON table has 32,768 rows for each DAY_ID (each day of the year) for a total of 11,960,320 rows&quot;

Could you please attach a link or show how you populate with data those two tables ?

Regards
Yoav</description>
		<content:encoded><![CDATA[<p>Hi Greg,<br />
Great example.<br />
&#8220;The CALENDAR table has 365 rows, one row for every day of the calendar year. The PERSON table has 32,768 rows for each DAY_ID (each day of the year) for a total of 11,960,320 rows&#8221;</p>
<p>Could you please attach a link or show how you populate with data those two tables ?</p>
<p>Regards<br />
Yoav</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oracle SQL Developer &#171; Oracle and other</title>
		<link>http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/comment-page-1/#comment-56</link>
		<dc:creator>Oracle SQL Developer &#171; Oracle and other</dc:creator>
		<pubDate>Thu, 17 Jul 2008 11:04:54 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/#comment-56</guid>
		<description>[...] Io recentemente l&#8217;ho messo nel file glogin.sql ed oggi, facendo esperimenti sulle orme di Greg Rahn ho riscontrato un effetto collaterale (di cui mi sono subito reso conto perchè ne avevo letto [...]</description>
		<content:encoded><![CDATA[<p>[...] Io recentemente l&#8217;ho messo nel file glogin.sql ed oggi, facendo esperimenti sulle orme di Greg Rahn ho riscontrato un effetto collaterale (di cui mi sono subito reso conto perchè ne avevo letto [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cristian Cudizio</title>
		<link>http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/comment-page-1/#comment-52</link>
		<dc:creator>Cristian Cudizio</dc:creator>
		<pubDate>Wed, 16 Jul 2008 15:46:38 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/#comment-52</guid>
		<description>Thank  you again,

Cristian</description>
		<content:encoded><![CDATA[<p>Thank  you again,</p>
<p>Cristian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Rahn</title>
		<link>http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/comment-page-1/#comment-51</link>
		<dc:creator>Greg Rahn</dc:creator>
		<pubDate>Wed, 16 Jul 2008 15:38:52 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2007/10/31/oracle-11g-extended-statistics/#comment-51</guid>
		<description>@Cristian

You are correct.  The first two only have single column predicates and are demonstrating that each have accurate cardinality estimates when used alone.  The third example demonstrates that even when the two predicates (which have correlation) are used together, the cardinality estimate is accurate due to the use of the extended statistics.</description>
		<content:encoded><![CDATA[<p>@Cristian</p>
<p>You are correct.  The first two only have single column predicates and are demonstrating that each have accurate cardinality estimates when used alone.  The third example demonstrates that even when the two predicates (which have correlation) are used together, the cardinality estimate is accurate due to the use of the extended statistics.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
