<?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: The Core Performance Fundamentals Of Oracle Data Warehousing &#8211; Partitioning</title> <atom:link href="http://structureddata.org/2010/01/25/the-core-performance-fundamentals-of-oracle-data-warehousing-partitioning/feed/" rel="self" type="application/rss+xml" /><link>http://structureddata.org/2010/01/25/the-core-performance-fundamentals-of-oracle-data-warehousing-partitioning/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=the-core-performance-fundamentals-of-oracle-data-warehousing-partitioning</link> <description>Oracle Database Performance and Scalability Blog</description> <lastBuildDate>Tue, 07 Sep 2010 20:58:50 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>By: The Core Performance Fundamentals Of Oracle Data Warehousing &#8211; Introduction</title><link>http://structureddata.org/2010/01/25/the-core-performance-fundamentals-of-oracle-data-warehousing-partitioning/comment-page-1/#comment-11832</link> <dc:creator>The Core Performance Fundamentals Of Oracle Data Warehousing &#8211; Introduction</dc:creator> <pubDate>Wed, 21 Jul 2010 10:26:13 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/?p=816#comment-11832</guid> <description>[...] data warehouses:Core Performance Fundamental Topics Balanced Hardware ConfigurationTable CompressionPartitioningParallel Execution Data LoadingRow vs. Set ProcessingIndexing and Materalized ViewsIn the upcoming [...]</description> <content:encoded><![CDATA[<p>[...] data warehouses:Core Performance Fundamental Topics Balanced Hardware ConfigurationTable CompressionPartitioningParallel Execution Data LoadingRow vs. Set ProcessingIndexing and Materalized ViewsIn the upcoming [...]</p> ]]></content:encoded> </item> <item><title>By: Greg Rahn</title><link>http://structureddata.org/2010/01/25/the-core-performance-fundamentals-of-oracle-data-warehousing-partitioning/comment-page-1/#comment-11175</link> <dc:creator>Greg Rahn</dc:creator> <pubDate>Thu, 29 Apr 2010 15:45:44 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/?p=816#comment-11175</guid> <description>@Paul JamesAs long as the keys are in a sorted order from month to month (they can be out of order within a month, but not cross month boundaries) it will work (though you should modify the date dimension data population to guarantee this -- its a &lt;strong&gt;very&lt;/strong&gt; good design practice).  If this is not the case, you would be best to redesign it to be such as the gains will likely be quite significant given partition elimination.I&#039;d recommend reading up on these Kimball Design Tips:
&lt;ul&gt;
&lt;li&gt;Kimball Design Tip #2: &lt;a href=&quot;http://www.kimballgroup.com/html/designtipsPDF/DesignTips2000%20/KimballDT2MultipleTime.pdf&quot; rel=&quot;nofollow&quot;&gt;Multiple Time Stamps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Kimball Design Tip #5: &lt;a href=&quot;http://www.kimballgroup.com/html/designtipsPDF/DesignTips2000%20/KimballDT5SurrogateKeys.pdf&quot; rel=&quot;nofollow&quot;&gt;Surrogate Keys for the Time Dimension&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Kimball Design Tip #51: &lt;a href=&quot;http://www.kimballgroup.com/html/designtipsPDF/KimballDT51LatestThinking.pdf&quot; rel=&quot;nofollow&quot;&gt;Latest Thinking on Time Dimension Table&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Kimball Design Tip #85: &lt;a href=&quot;http://www.kimballgroup.com/html/designtipsPDF/DesignTips2006/KU85SmartDateKeysPartitionFactTables.pdf&quot; rel=&quot;nofollow&quot;&gt;Smart Date Keys to Partition Fact Tables&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt; </description> <content:encoded><![CDATA[<p>@Paul James</p><p>As long as the keys are in a sorted order from month to month (they can be out of order within a month, but not cross month boundaries) it will work (though you should modify the date dimension data population to guarantee this &#8212; its a <strong>very</strong> good design practice).  If this is not the case, you would be best to redesign it to be such as the gains will likely be quite significant given partition elimination.</p><p>I&#8217;d recommend reading up on these Kimball Design Tips:</p><ul><li>Kimball Design Tip #2: <a
href="http://www.kimballgroup.com/html/designtipsPDF/DesignTips2000%20/KimballDT2MultipleTime.pdf" rel="nofollow">Multiple Time Stamps</a></li><li>Kimball Design Tip #5: <a
href="http://www.kimballgroup.com/html/designtipsPDF/DesignTips2000%20/KimballDT5SurrogateKeys.pdf" rel="nofollow">Surrogate Keys for the Time Dimension</a></li><li>Kimball Design Tip #51: <a
href="http://www.kimballgroup.com/html/designtipsPDF/KimballDT51LatestThinking.pdf" rel="nofollow">Latest Thinking on Time Dimension Table</a></li><li>Kimball Design Tip #85: <a
href="http://www.kimballgroup.com/html/designtipsPDF/DesignTips2006/KU85SmartDateKeysPartitionFactTables.pdf" rel="nofollow">Smart Date Keys to Partition Fact Tables</a></li></ul> ]]></content:encoded> </item> <item><title>By: Paul James</title><link>http://structureddata.org/2010/01/25/the-core-performance-fundamentals-of-oracle-data-warehousing-partitioning/comment-page-1/#comment-11171</link> <dc:creator>Paul James</dc:creator> <pubDate>Thu, 29 Apr 2010 07:41:54 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/?p=816#comment-11171</guid> <description>&lt;a href=&quot;#comment-11168&quot; rel=&quot;nofollow&quot;&gt;@Greg Rahn &lt;/a&gt;The surrogate keys are just numbers, so 2010-01-01 could be 245 and 2010-02-01 : 263 etc.And because they are generated from a sequence there is no guarantee thet the key for a date has an relation to it&#039;s date sequence.So I&#039;m not sure your example applies in this scenario.</description> <content:encoded><![CDATA[<p><a
href="#comment-11168" rel="nofollow">@Greg Rahn </a></p><p>The surrogate keys are just numbers, so 2010-01-01 could be 245 and 2010-02-01 : 263 etc.</p><p>And because they are generated from a sequence there is no guarantee thet the key for a date has an relation to it&#8217;s date sequence.</p><p>So I&#8217;m not sure your example applies in this scenario.</p> ]]></content:encoded> </item> <item><title>By: Greg Rahn</title><link>http://structureddata.org/2010/01/25/the-core-performance-fundamentals-of-oracle-data-warehousing-partitioning/comment-page-1/#comment-11168</link> <dc:creator>Greg Rahn</dc:creator> <pubDate>Wed, 28 Apr 2010 18:32:26 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/?p=816#comment-11168</guid> <description>@Paul JamesFor 1 month partitions you can use range partitioning and use the date key for first day of the next month as the &quot;values less than&quot; value.For example:
&lt;code&gt;create table fact ( ... )
partition by range(date_key) (
partition p200912 values less than({date_key for 2010-01-01}),
partition p201001 values less than({date_key for 2010-02-01}),
partition p201002 values less than({date_key for 2010-03-01}),
...)&lt;/code&gt;</description> <content:encoded><![CDATA[<p>@Paul James</p><p>For 1 month partitions you can use range partitioning and use the date key for first day of the next month as the &#8220;values less than&#8221; value.</p><p>For example:<br
/> <code>create table fact ( ... )<br
/> partition by range(date_key) (<br
/> partition p200912 values less than({date_key for 2010-01-01}),<br
/> partition p201001 values less than({date_key for 2010-02-01}),<br
/> partition p201002 values less than({date_key for 2010-03-01}),<br
/> ...)</code></p> ]]></content:encoded> </item> <item><title>By: Paul James</title><link>http://structureddata.org/2010/01/25/the-core-performance-fundamentals-of-oracle-data-warehousing-partitioning/comment-page-1/#comment-11163</link> <dc:creator>Paul James</dc:creator> <pubDate>Wed, 28 Apr 2010 12:26:42 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/?p=816#comment-11163</guid> <description>So, in a data warehouse with a transactional fact table with a date dimension (where the surrogate key for the dimension is populated by a sequence) how would you approach partitioning by month?Hard code surrogate keys for list partitioning, just partition by day surrogate key (and ignore the month) or something else?Thanks,
Paul</description> <content:encoded><![CDATA[<p>So, in a data warehouse with a transactional fact table with a date dimension (where the surrogate key for the dimension is populated by a sequence) how would you approach partitioning by month?</p><p>Hard code surrogate keys for list partitioning, just partition by day surrogate key (and ignore the month) or something else?</p><p>Thanks,<br
/> Paul</p> ]]></content:encoded> </item> <item><title>By: Greg Rahn</title><link>http://structureddata.org/2010/01/25/the-core-performance-fundamentals-of-oracle-data-warehousing-partitioning/comment-page-1/#comment-11141</link> <dc:creator>Greg Rahn</dc:creator> <pubDate>Sun, 25 Apr 2010 14:25:47 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/?p=816#comment-11141</guid> <description>@Fahd MirzaTo quote the link from the Oracle Documentation from my previous response:
&lt;blockquote&gt;A bitmap index should be built on each of the foreign key columns of the fact table or tables&lt;/blockquote&gt;
so, if you desire star transformation, then both FK columns on the fact table require bitmap indexes.The date column can be represented by a number which is the key to the time/date dimension so it is ok to use this for the partitioning key.  Oracle can use subquery pruning or bloom filters to first get the list of values from the time/date dimension and use that to get partition pruning.The indexes you create should be to solve a problem.  You have not stated what you are trying to solve so I really can not make any index recommendations.  It&#039;s like asking &quot;should I go to the doctor&quot;?  The answer depends on if you are sick or not, and you have not provided enough detail to determine this.</description> <content:encoded><![CDATA[<p>@Fahd Mirza</p><p>To quote the link from the Oracle Documentation from my previous response:</p><blockquote><p>A bitmap index should be built on each of the foreign key columns of the fact table or tables</p></blockquote><p>so, if you desire star transformation, then both FK columns on the fact table require bitmap indexes.</p><p>The date column can be represented by a number which is the key to the time/date dimension so it is ok to use this for the partitioning key.  Oracle can use subquery pruning or bloom filters to first get the list of values from the time/date dimension and use that to get partition pruning.</p><p>The indexes you create should be to solve a problem.  You have not stated what you are trying to solve so I really can not make any index recommendations.  It&#8217;s like asking &#8220;should I go to the doctor&#8221;?  The answer depends on if you are sick or not, and you have not provided enough detail to determine this.</p> ]]></content:encoded> </item> <item><title>By: Fahd Mirza</title><link>http://structureddata.org/2010/01/25/the-core-performance-fundamentals-of-oracle-data-warehousing-partitioning/comment-page-1/#comment-11137</link> <dc:creator>Fahd Mirza</dc:creator> <pubDate>Sun, 25 Apr 2010 05:46:33 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/?p=816#comment-11137</guid> <description>@Greg, thanks for the answer. You certainly cleared many things.My question is that as in a dimensional model, there are certain dimension tables and then there is a fact table. In the fact table, there are foreign keys from the dimensions and then there are fact columns:e.g.SQL&gt; DESC Customer_FactCustomer_Fact_pk --------&gt; Surrogate Key
Customer_Transaction_Date_fk --------&gt; Foreign Key from the Time dimension
Customer_Region_fk -----------&gt; Foreign Key from the Region dimension
Amount-----&gt; additive factNow please correct/validate me on the following point:we should create bitmap indexes on Customer_Transaction_Date_fk and Customer_Region_fk columns.What sort of index should we create on Customer_Fact_pk and Amount column?Should we range partition this fact table on Customer_Transaction_Date_fk?  But as this column contains number and not a date, so should we include the date column also in the fact table and partition the table on that date column?Thanks and best regardsFahd</description> <content:encoded><![CDATA[<p>@Greg, thanks for the answer. You certainly cleared many things.</p><p>My question is that as in a dimensional model, there are certain dimension tables and then there is a fact table. In the fact table, there are foreign keys from the dimensions and then there are fact columns:</p><p>e.g.</p><p>SQL&gt; DESC Customer_Fact</p><p>Customer_Fact_pk &#8212;&#8212;&#8211;&gt; Surrogate Key<br
/> Customer_Transaction_Date_fk &#8212;&#8212;&#8211;&gt; Foreign Key from the Time dimension<br
/> Customer_Region_fk &#8212;&#8212;&#8212;&#8211;&gt; Foreign Key from the Region dimension<br
/> Amount&#8212;&#8211;&gt; additive fact</p><p>Now please correct/validate me on the following point:</p><p>we should create bitmap indexes on Customer_Transaction_Date_fk and Customer_Region_fk columns.</p><p>What sort of index should we create on Customer_Fact_pk and Amount column?</p><p>Should we range partition this fact table on Customer_Transaction_Date_fk?  But as this column contains number and not a date, so should we include the date column also in the fact table and partition the table on that date column?</p><p>Thanks and best regards</p><p>Fahd</p> ]]></content:encoded> </item> <item><title>By: Greg Rahn</title><link>http://structureddata.org/2010/01/25/the-core-performance-fundamentals-of-oracle-data-warehousing-partitioning/comment-page-1/#comment-11136</link> <dc:creator>Greg Rahn</dc:creator> <pubDate>Sun, 25 Apr 2010 04:22:39 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/?p=816#comment-11136</guid> <description>@Fahd Mirza
It would help to provide a bit more context as to what exactly you are asking or trying to achieve, but here are my answers/guesses?Q: Should tables loaded by time have the time key as the partition key?
A: The partition key should be the column that represents when the event happened and is frequently used in the predicate of queries so partition pruning/elimination can be leveraged.  E.g. How much was sold yesterday (or last Tuesday) can prune to 1 day or 1 month, etc.Q: Should the fact table FK columns have bitmap indexes on them?
A: If your design is to leverage star transformations, then yes.  &lt;a href=&quot;http://download.oracle.com/docs/cd/E14072_01/server.112/e10810/schemas.htm#CIHGHEFB&quot; rel=&quot;nofollow&quot;&gt;Read more&lt;/a&gt;.Q: Should indexes be local prefixed b-tree?
A: Possibly.  Indexes should have a design that solves a problem.  E.g. Use what design is necessary to get the execution plan you desire, but if you are using star transformation, then it is unlikely you will have any other indexes other than the FK bitmaps.Q: Should stats be gathered after every load with DBMS_STATS.AUTO_SAMPLE_SIZE?
A: Stats should be gathered where there are none or they are stale.  If on 11g, then yes, else generally yes, but there may be exceptions (&lt;a href=&quot;http://structureddata.org/2007/09/17/oracle-11g-enhancements-to-dbms_stats/&quot; rel=&quot;nofollow&quot;&gt;read more&lt;/a&gt;).</description> <content:encoded><![CDATA[<p>@Fahd Mirza<br
/> It would help to provide a bit more context as to what exactly you are asking or trying to achieve, but here are my answers/guesses?</p><p>Q: Should tables loaded by time have the time key as the partition key?<br
/> A: The partition key should be the column that represents when the event happened and is frequently used in the predicate of queries so partition pruning/elimination can be leveraged.  E.g. How much was sold yesterday (or last Tuesday) can prune to 1 day or 1 month, etc.</p><p>Q: Should the fact table FK columns have bitmap indexes on them?<br
/> A: If your design is to leverage star transformations, then yes. <a
href="http://download.oracle.com/docs/cd/E14072_01/server.112/e10810/schemas.htm#CIHGHEFB" rel="nofollow">Read more</a>.</p><p>Q: Should indexes be local prefixed b-tree?<br
/> A: Possibly.  Indexes should have a design that solves a problem.  E.g. Use what design is necessary to get the execution plan you desire, but if you are using star transformation, then it is unlikely you will have any other indexes other than the FK bitmaps.</p><p>Q: Should stats be gathered after every load with DBMS_STATS.AUTO_SAMPLE_SIZE?<br
/> A: Stats should be gathered where there are none or they are stale.  If on 11g, then yes, else generally yes, but there may be exceptions (<a
href="http://structureddata.org/2007/09/17/oracle-11g-enhancements-to-dbms_stats/" rel="nofollow">read more</a>).</p> ]]></content:encoded> </item> <item><title>By: Fahd Mirza</title><link>http://structureddata.org/2010/01/25/the-core-performance-fundamentals-of-oracle-data-warehousing-partitioning/comment-page-1/#comment-11129</link> <dc:creator>Fahd Mirza</dc:creator> <pubDate>Sat, 24 Apr 2010 13:36:06 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/?p=816#comment-11129</guid> <description>Greg, would you please look at the following point and comment:Almost all the times, fact tables in the data warehouses should be partitioned. If the data is loaded w.r.t time then the partition key should be the date column. All the foreign keys in fact table should have bit map indexes upon them. Local prefixed indexs should be created on the partitions haveing the partition key at the leading edge, and these indexes should be B Tree. Stats should be gathered after every data load and the estimate size should be DBMS_STATS.AUTO_SAMPLE_SIZE.Thanks and regards</description> <content:encoded><![CDATA[<p>Greg, would you please look at the following point and comment:</p><p>Almost all the times, fact tables in the data warehouses should be partitioned. If the data is loaded w.r.t time then the partition key should be the date column. All the foreign keys in fact table should have bit map indexes upon them. Local prefixed indexs should be created on the partitions haveing the partition key at the leading edge, and these indexes should be B Tree. Stats should be gathered after every data load and the estimate size should be DBMS_STATS.AUTO_SAMPLE_SIZE.</p><p>Thanks and regards</p> ]]></content:encoded> </item> <item><title>By: Sam</title><link>http://structureddata.org/2010/01/25/the-core-performance-fundamentals-of-oracle-data-warehousing-partitioning/comment-page-1/#comment-11101</link> <dc:creator>Sam</dc:creator> <pubDate>Fri, 09 Apr 2010 15:13:37 +0000</pubDate> <guid
isPermaLink="false">http://structureddata.org/?p=816#comment-11101</guid> <description>Looking forward to your updates?</description> <content:encoded><![CDATA[<p>Looking forward to your updates?</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 6/21 queries in 0.032 seconds using disk

Served from: structureddata.org @ 2010-09-09 10:18:21 -->