<?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"
	>
<channel>
	<title>Comments on: Year-to-Date Query Improvement Through Transformation Tables</title>
	<atom:link href="http://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/feed/" rel="self" type="application/rss+xml" />
	<link>http://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/</link>
	<description>Oracle Data Warehouse Design and Architecture</description>
	<pubDate>Fri, 04 Jul 2008 18:52:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
		<item>
		<title>By: David Aldridge</title>
		<link>http://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-51044</link>
		<dc:creator>David Aldridge</dc:creator>
		<pubDate>Tue, 10 Jun 2008 15:33:37 +0000</pubDate>
		<guid isPermaLink="false">https://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-51044</guid>
		<description>The issue here is that although it is expedient to code a non-equijoin to implement a metric such as a year-to-date sales sum, it is generally better to create a table to implement the requirement as equi-joins because that allows the optimizer to implement the query using the extremely low cost hash join.

As for the name, I'm not particularly attached to "transformation" ... a rose by any other name would smell as sweet, right? I seem to recall that the last time I used Microstrategy they refered to these types of metrics as "transcendental".</description>
		<content:encoded><![CDATA[<p>The issue here is that although it is expedient to code a non-equijoin to implement a metric such as a year-to-date sales sum, it is generally better to create a table to implement the requirement as equi-joins because that allows the optimizer to implement the query using the extremely low cost hash join.</p>
<p>As for the name, I&#8217;m not particularly attached to &#8220;transformation&#8221; &#8230; a rose by any other name would smell as sweet, right? I seem to recall that the last time I used Microstrategy they refered to these types of metrics as &#8220;transcendental&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lodewijk Wiggers</title>
		<link>http://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-51043</link>
		<dc:creator>Lodewijk Wiggers</dc:creator>
		<pubDate>Tue, 10 Jun 2008 14:26:15 +0000</pubDate>
		<guid isPermaLink="false">https://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-51043</guid>
		<description>Transformation tables?? I hope i am not misunderstanding this, but you are just refering to having smart time/date dimensions which make these kinds of conditional summing time/date wise possible

date      year  period month first_day_of_year  first_day_of_month first_day_of_week previous_workday
20080609  2008  200806 06    20080101           20080301           20080609          20080606
20080610  2008  200806 06    20080101           20080301           20080609          20080609
20080611  2008  200806 06    20080101           20080301           20080609          20080610
...

This can be extended to all the usefull conditional summing you might need, as in for example the normally hard to solve business day summing: give me the total of the last 5 business days...

Having pre-generated time/date dimensions like this makes conditional summing so much easier.

Just don't understand why people call them 'transformation' tables, that just doesn't make sense. What is there to 'transform'?</description>
		<content:encoded><![CDATA[<p>Transformation tables?? I hope i am not misunderstanding this, but you are just refering to having smart time/date dimensions which make these kinds of conditional summing time/date wise possible</p>
<p>date      year  period month first_day_of_year  first_day_of_month first_day_of_week previous_workday<br />
20080609  2008  200806 06    20080101           20080301           20080609          20080606<br />
20080610  2008  200806 06    20080101           20080301           20080609          20080609<br />
20080611  2008  200806 06    20080101           20080301           20080609          20080610<br />
&#8230;</p>
<p>This can be extended to all the usefull conditional summing you might need, as in for example the normally hard to solve business day summing: give me the total of the last 5 business days&#8230;</p>
<p>Having pre-generated time/date dimensions like this makes conditional summing so much easier.</p>
<p>Just don&#8217;t understand why people call them &#8216;transformation&#8217; tables, that just doesn&#8217;t make sense. What is there to &#8216;transform&#8217;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: akhil</title>
		<link>http://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-51036</link>
		<dc:creator>akhil</dc:creator>
		<pubDate>Tue, 03 Jun 2008 06:12:22 +0000</pubDate>
		<guid isPermaLink="false">https://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-51036</guid>
		<description>hai all i want pervious quarter start date and end date</description>
		<content:encoded><![CDATA[<p>hai all i want pervious quarter start date and end date</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rittman Mead Consulting &#187; Blog Archive &#187; Year-to-date alternatives</title>
		<link>http://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-50815</link>
		<dc:creator>Rittman Mead Consulting &#187; Blog Archive &#187; Year-to-date alternatives</dc:creator>
		<pubDate>Mon, 17 Mar 2008 14:25:24 +0000</pubDate>
		<guid isPermaLink="false">https://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-50815</guid>
		<description>[...] Aldridge challenged me to write about functions that return lists of dates. So here [...]</description>
		<content:encoded><![CDATA[<p>[...] Aldridge challenged me to write about functions that return lists of dates. So here [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-35154</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Tue, 17 Jul 2007 20:57:17 +0000</pubDate>
		<guid isPermaLink="false">https://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-35154</guid>
		<description>I can't get to the complete test script, and the result of an execution on Oracle 10.2.0.2.0.  Please correct link.  thanks.</description>
		<content:encoded><![CDATA[<p>I can&#8217;t get to the complete test script, and the result of an execution on Oracle 10.2.0.2.0.  Please correct link.  thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Time series problems &#171; Pete-s random notes</title>
		<link>http://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-30389</link>
		<dc:creator>Time series problems &#171; Pete-s random notes</dc:creator>
		<pubDate>Thu, 14 Jun 2007 19:19:15 +0000</pubDate>
		<guid isPermaLink="false">https://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-30389</guid>
		<description>[...] series&#160;problems    A while back David Aldridge and I both blogged about the joys of time series analysis on sparse data; that is, the sort of data [...]</description>
		<content:encoded><![CDATA[<p>[...] series&nbsp;problems    A while back David Aldridge and I both blogged about the joys of time series analysis on sparse data; that is, the sort of data [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen</title>
		<link>http://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-12127</link>
		<dc:creator>Stephen</dc:creator>
		<pubDate>Wed, 14 Mar 2007 09:29:07 +0000</pubDate>
		<guid isPermaLink="false">https://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-12127</guid>
		<description>it is clear to me too!!!

thanks</description>
		<content:encoded><![CDATA[<p>it is clear to me too!!!</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rogier Werschkull</title>
		<link>http://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-2729</link>
		<dc:creator>Rogier Werschkull</dc:creator>
		<pubDate>Wed, 11 Oct 2006 15:31:55 +0000</pubDate>
		<guid isPermaLink="false">https://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-2729</guid>
		<description>Thank you David, it is clear to me now!</description>
		<content:encoded><![CDATA[<p>Thank you David, it is clear to me now!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Aldridge</title>
		<link>http://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-2727</link>
		<dc:creator>David Aldridge</dc:creator>
		<pubDate>Wed, 11 Oct 2006 14:34:52 +0000</pubDate>
		<guid isPermaLink="false">https://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-2727</guid>
		<description>Rogier,

The month always has to be included in the select clause, and if you have any other higher dimensional columns in the YTD table they would be purely for predicating -- for example, "give me the year-to-month totals for all months in quarter 2006 Q3".

If you wanted to apply the same method to year-to-quarter queries you'd use a different table ....

2006Q1 2006Q1
2006Q2 2006Q1
2006Q2 2006Q2
2006Q3 2006Q1
2006Q3 2006Q2
2006Q3 2006Q3
2006Q4 2006Q1
2006Q4 2006Q2
2006Q4 2006Q3
2006Q4 2006Q4</description>
		<content:encoded><![CDATA[<p>Rogier,</p>
<p>The month always has to be included in the select clause, and if you have any other higher dimensional columns in the YTD table they would be purely for predicating &#8212; for example, &#8220;give me the year-to-month totals for all months in quarter 2006 Q3&#8243;.</p>
<p>If you wanted to apply the same method to year-to-quarter queries you&#8217;d use a different table &#8230;.</p>
<p>2006Q1 2006Q1<br />
2006Q2 2006Q1<br />
2006Q2 2006Q2<br />
2006Q3 2006Q1<br />
2006Q3 2006Q2<br />
2006Q3 2006Q3<br />
2006Q4 2006Q1<br />
2006Q4 2006Q2<br />
2006Q4 2006Q3<br />
2006Q4 2006Q4</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rogier Werschkull</title>
		<link>http://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-2719</link>
		<dc:creator>Rogier Werschkull</dc:creator>
		<pubDate>Wed, 11 Oct 2006 09:34:42 +0000</pubDate>
		<guid isPermaLink="false">https://oraclesponge.wordpress.com/2006/08/15/year-to-date-query-improvement-through-transformation-tables/#comment-2719</guid>
		<description>I don't quite get it, take the example below for data that has a yearmonth grain. if i would like the yearmonth totals for 2006Q1 and 2006Q2 i would get wrong results because I would get duplicates of the yearmonth in ytd column that will be joined to the facts...

regards,
Rogier Werschkull
------------
&lt;b&gt;yearmonth in ytd	yearmonth	quarter&lt;/b&gt;
200601	200601	2006Q1
200601	200602	2006Q1
200602	200602	2006Q1
200601	200603	2006Q1
200602	200603	2006Q1
200603	200603	2006Q1
200601	200604	2006Q2
200602	200604	2006Q2
200603	200604	2006Q2
200604	200604	2006Q2
200601	200605	2006Q2
200602	200605	2006Q2
200603	200605	2006Q2
200604	200605	2006Q2
200605	200605	2006Q2
200601	200606	2006Q2
200602	200606	2006Q2
200603	200606	2006Q2
200604	200606	2006Q2
200605	200606	2006Q2
200606	200606	2006Q2</description>
		<content:encoded><![CDATA[<p>I don&#8217;t quite get it, take the example below for data that has a yearmonth grain. if i would like the yearmonth totals for 2006Q1 and 2006Q2 i would get wrong results because I would get duplicates of the yearmonth in ytd column that will be joined to the facts&#8230;</p>
<p>regards,<br />
Rogier Werschkull<br />
&#8212;&#8212;&#8212;&#8212;<br />
<b>yearmonth in ytd	yearmonth	quarter</b><br />
200601	200601	2006Q1<br />
200601	200602	2006Q1<br />
200602	200602	2006Q1<br />
200601	200603	2006Q1<br />
200602	200603	2006Q1<br />
200603	200603	2006Q1<br />
200601	200604	2006Q2<br />
200602	200604	2006Q2<br />
200603	200604	2006Q2<br />
200604	200604	2006Q2<br />
200601	200605	2006Q2<br />
200602	200605	2006Q2<br />
200603	200605	2006Q2<br />
200604	200605	2006Q2<br />
200605	200605	2006Q2<br />
200601	200606	2006Q2<br />
200602	200606	2006Q2<br />
200603	200606	2006Q2<br />
200604	200606	2006Q2<br />
200605	200606	2006Q2<br />
200606	200606	2006Q2</p>
]]></content:encoded>
	</item>
</channel>
</rss>
