<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Applied dimensionality &#187; blogging</title>
	<atom:link href="http://ykud.com/blog/category/blogging/feed" rel="self" type="application/rss+xml" />
	<link>http://ykud.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 30 Apr 2012 06:10:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>A cow jumped over the earth</title>
		<link>http://ykud.com/blog/blogging/a-cow-jumped-over-the-earth</link>
		<comments>http://ykud.com/blog/blogging/a-cow-jumped-over-the-earth#comments</comments>
		<pubDate>Thu, 27 Oct 2011 09:11:03 +0000</pubDate>
		<dc:creator>ykud</dc:creator>
				<category><![CDATA[blogging]]></category>

		<guid isPermaLink="false">http://ykud.com/blog/?p=702</guid>
		<description><![CDATA[Big news: we&#8217;ve relocated to Sydney, Australia (yep, the one with the Opera house, kangaroos and Fosters). And as of 1st of November I&#8217;ll be joining small, but proud &#8221;bunch of guys that share the same passion and dedication for Cognos (and sometimes the same sick humour :))&#8221; ©, namely, PMSquare. There&#8217;ll be more upside-down stories here, I promise. &#160; As [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ykud.com/blog/wp-content/uploads/2011/10/1006843.jpg"><img class="alignleft size-medium wp-image-703" title="1006843" src="http://ykud.com/blog/wp-content/uploads/2011/10/1006843-300x200.jpg" alt="" width="300" height="200" /></a>Big news: we&#8217;ve relocated to Sydney, Australia (yep, the one with the Opera house, kangaroos and Fosters).</p>
<p>And as of 1st of November I&#8217;ll be joining small, but proud &#8221;bunch of guys that share the same passion and dedication for Cognos (and sometimes the same sick humour :))&#8221; ©, namely, <a href="http://pmsquare.com.au/">PMSquare</a>.</p>
<p>There&#8217;ll be more upside-down stories here, I promise.</p>
<p>&nbsp;</p>
<p>As they say it here, &#8220;Cheers to you all&#8221; <img src='http://ykud.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://ykud.com/blog/blogging/a-cow-jumped-over-the-earth/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Back from winter-sleep</title>
		<link>http://ykud.com/blog/bicpm/back-from-winter-sleep</link>
		<comments>http://ykud.com/blog/bicpm/back-from-winter-sleep#comments</comments>
		<pubDate>Sun, 01 Mar 2009 09:04:38 +0000</pubDate>
		<dc:creator>ykud</dc:creator>
				<category><![CDATA[bi]]></category>
		<category><![CDATA[BI&CPM]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[cognos]]></category>
		<category><![CDATA[ep]]></category>
		<category><![CDATA[hyperion]]></category>
		<category><![CDATA[ibm]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[certification]]></category>
		<category><![CDATA[cognos certification]]></category>
		<category><![CDATA[essbase]]></category>
		<category><![CDATA[tm1]]></category>

		<guid isPermaLink="false">http://ykud.com/blog/?p=176</guid>
		<description><![CDATA[Okay, it has been almost half-a-year (oh, dears) since the last decent post on this blog. Russian one has suffered as well, I must note. Reasons vary, but mostly it&#8217;s that I&#8217;ve been, you know, busy-busy. As I now start to reflect on it, it&#8217;s always a point of view thing and a question of [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, it has been almost half-a-year (oh, dears) since the last decent post on this blog. Russian one has suffered as well, I must note.</p>
<p>Reasons vary, but mostly it&#8217;s that I&#8217;ve been, you know, busy-busy. As I now start to reflect on it, it&#8217;s always a point of view thing and a question of self-control and ability to say no )</p>
<p>But enough philosphy, brief recap on what happend while I was out &#8220;there&#8221; in real world. I&#8217;ll divide this into two parts (by vendors ))</p>
<p><span id="more-176"></span></p>
<h2>Big Blue</h2>
<p>Made some POCs in autumn, nothing that special (some neat integration, but not cognos-related). Carried on a couple of projects with  EP+BI typicalities. All in all, nothing that new.</p>
<p>BUT I&#8217;ve finally completed the other certification path there is at Cognos\IBM, notably, the &#8220;BI Professional&#8221; road. It&#8217;s a deal longer, as of now, you have to pass 3 &#8220;<a href="http://support.cognos.com/en/training/certification/role-based.html">role-based</a>&#8221; exams, 2 mandatory (Report Author and Metadata Model Developer) and one of you choice to get a chance of passing BI Pro exam. It&#8217;s used to coast 10k, which could be cut down to reasonable 200$ if you attended a Cognos Workshop (which costed 2,5k), but thanks to IBM that&#8217;s gone and now it&#8217;s 200$ from the start. Just opened certifications link and I&#8217;m, frankly, quite surprised with new IBM names for old Cognos certifications. According to this I&#8217;m:</p>
<ul>
<li>IBM Certified Designer &#8212; Cognos 8 BI Reports</li>
<li>IBM Certified Developer &#8212; Cognos 8 BI Metadata Models</li>
<li>IBM Certified Developer &#8212; Cognos 8 BI OLAP Models</li>
<li>IBM Certified Solution Expert &#8212; Cognos 8 BI</li>
</ul>
<p>and it turns out I was an</p>
<ul>
<li>IBM Certified Solution Expert &#8212; Cognos 8 Enterprise Planning</li>
</ul>
<p>instead of Cognos EP Professional.</p>
<p>Wording is something you cannot easily take from IBM ) Will put that list in about page, just to get more mail asking for exam questions.</p>
<p>Hint: In comparison with the old Modeler exam, current one is easier.</p>
<p>And in the first 2 months of this year we did a &#8220;nightmare-style&#8221; POC with EP + TM1 + BI, where I could finally get an idea of what TM1 really is and fully realize some ideas like incremental administration links and, therefore, &#8220;real-time&#8221; EP -&gt; TM1  data propagation. I&#8217;m planning to write about this in separate posts, though. And, boy, it was hard, and we flanked the final presentation due to me being ill and bla-bla, and I&#8217;m still recovering breath from this.</p>
<p>But enough about IBM, let&#8217;s turn to</p>
<h2>Oracle</h2>
<p>We&#8217;ve made a really nice billion-facts cube with our colleagues from &#8220;SportMaster&#8221; and talked about it in exceeding detail on <a href="http://www.oracleclub.ru/techforum/">Russian Oracle Technical Forum 2008 </a>and Oracle BI Forum 2009. Essbase turned out to be a good engine for this kind of task and the moment when it finally kicked-in on 100gb dataset will retain as one of best in 2008. The fact that one of dimensions was a million rows parent-child didn&#8217;t raise that much of a problem.</p>
<p>Moreover on another site we duly built dimension outline with around 30 mln members. Although duly is not the right word, &#8220;kicking and screaming&#8221; would be a better wording ) And the whole area of trying to tune something in underlying Berkeley DB is still open. But I must admit, an 8 gb outline file is really impressive.</p>
<p>So I&#8217;ve spent pretty much time toying around with essbase (except when I wasn&#8217;t with TM1)). And I&#8217;m also a Hyperion Essbase 9.3 Developer Certified Expert (I won&#8217;t enter Prometric for a while, I hope).</p>
<p>So it was a rather crowded time and I hope that nothing will stop me from blogging some details and future encounters. At least, I&#8217;d try my best to. Cheers to your patience, folks )</p>
]]></content:encoded>
			<wfw:commentRss>http://ykud.com/blog/bicpm/back-from-winter-sleep/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Go west</title>
		<link>http://ykud.com/blog/blogging/go-west</link>
		<comments>http://ykud.com/blog/blogging/go-west#comments</comments>
		<pubDate>Mon, 21 Jul 2008 09:18:53 +0000</pubDate>
		<dc:creator>ykud</dc:creator>
				<category><![CDATA[blogging]]></category>

		<guid isPermaLink="false">http://ykud.com/blog/?p=145</guid>
		<description><![CDATA[I&#8217;m not dead, just trying to push it through to my vacation. Lot&#8217;s of small news, like &#8216;I&#8217;ve attached cognos to essbase cubes and they work together like charm, I&#8217;m impressed&#8217;, but no time to write it out. Anyway. I&#8217;ll be spending next couple of weeks in Europe, so if you want to share a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not dead, just trying to push it through to my vacation. Lot&#8217;s of small news, like &#8216;I&#8217;ve attached cognos to essbase cubes and they work together like charm, I&#8217;m impressed&#8217;, but no time to write it out.</p>
<p>Anyway. I&#8217;ll be spending next couple of weeks in Europe, so if you want to share a beer &#8212; drop a line.<br />
I&#8217;ll be starting 29.07 in Amsterdam with no set programm afterwards (although Berlin seems a definite place-to-go). </p>
]]></content:encoded>
			<wfw:commentRss>http://ykud.com/blog/blogging/go-west/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Technicalities and my ru_blog</title>
		<link>http://ykud.com/blog/blogging/technicalities-and-my-ru_blog</link>
		<comments>http://ykud.com/blog/blogging/technicalities-and-my-ru_blog#comments</comments>
		<pubDate>Wed, 28 May 2008 12:10:44 +0000</pubDate>
		<dc:creator>ykud</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[closed_cubes]]></category>
		<category><![CDATA[olap]]></category>

		<guid isPermaLink="false">http://ykud.com/blog/?p=139</guid>
		<description><![CDATA[New digest: 1 This blog changed hosting once more. Now it&#8217;s ultra speed webfaction instead of Yahoo. Speed, ssh, svn are main switch reasons 2 I&#8217;ve started a more light-weighted blog in russian ykud.ru (who&#8217;d guess). 3 And I&#8217;m thinking about this blog&#8217;s future. I&#8217;ve got only one post laying in drafts (it&#8217;s called &#8220;Testing [...]]]></description>
			<content:encoded><![CDATA[<p>New digest:</p>
<p>1 This blog changed hosting once more. Now it&#8217;s ultra speed webfaction instead of Yahoo.<br />
Speed, ssh, svn  are main switch reasons</p>
<p>2 I&#8217;ve started a more light-weighted blog in russian <a href="http://ykud.ru">ykud.ru</a> (who&#8217;d guess).</p>
<p>3 And I&#8217;m thinking about this blog&#8217;s future. I&#8217;ve got only one post laying in drafts (it&#8217;s called &#8220;Testing in EP&#8221;) and after publishing it I&#8217;ll be out of ideas to write about. Temporatily, I hope.</p>
<p>Maybe I&#8217;ll publish my current OLAP-research ideas, since I&#8217;ve already been <a href="http://doi.ieeecomputersociety.org/10.1109/ICIS.2008.63">beat-up by some china research group</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ykud.com/blog/blogging/technicalities-and-my-ru_blog/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enterprise PLanning Objects Naming Convention.</title>
		<link>http://ykud.com/blog/analyst/enterprise-planning-objects-naming-convention</link>
		<comments>http://ykud.com/blog/analyst/enterprise-planning-objects-naming-convention#comments</comments>
		<pubDate>Fri, 16 May 2008 10:54:50 +0000</pubDate>
		<dc:creator>ykud</dc:creator>
				<category><![CDATA[analyst]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[cognos]]></category>
		<category><![CDATA[ep cookbook]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[contributor]]></category>

		<guid isPermaLink="false">http://ykud.com/blog/?p=219</guid>
		<description><![CDATA[As I&#8217;ve promised, here are naming conventions I tend to follow in EP projects. Setting up naming rules doesn&#8217;t seem so crucial at project start, but generally hits on you on the head on final phase, when development turns to support. And trying to support your colleagues model will leave you thinking about naming objects [...]]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://ykud.com/blog/?p=215">I&#8217;ve promised</a>, here are naming conventions I tend to follow in EP projects.<br />
Setting up naming rules doesn&#8217;t seem so crucial at project start, but generally hits on you on the head on final phase, when development turns to support. And trying to support your colleagues model will leave you thinking about naming objects the same way more than once <img src='http://ykud.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  So naming conventions are one of main project documents for me now.</p>
<p>I really expect and encourage comments on this naming proposal. Maybe together we will create something like <a href="http://java.sun.com/docs/codeconv/html/CodeConventions.doc8.html">Sun Java Code Conventions</a> )<br />
<span id="more-138"></span></p>
<table border=1 width="100%">
<tr>
<th align="left" bgcolor="#C0C0C0" bordercolor="#FFFFFF">Object</th>
<th align="left" bgcolor="#C0C0C0" bordercolor="#FFFFFF">Naming rule</th>
<th align="left" bgcolor="#C0C0C0" bordercolor="#FFFFFF">Example</th>
</tr>
<tr>
<td bgcolor="#DAA0A0" bordercolor="#FFFFFF"><b>Analyst</b>:</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Library</td>
<td>Library names are not that important, though if you use Analyst with Contributor, consider creating stub libraries for importing data to\from Contributor, as <a href="http://ykud.com/blog/?p=92">I&#8217;ve described here</a>. No data in skeleton library is a motto that will help you more than once, I guarantee. <br /> Library codes are important if you want to keep a single store of projects (in consulting company, or competency center) and you&#8217;d better create some seeding rules for creating unique 9 numbers for projects. <br /> A simple scheme of xxxxyylll, where xs are project code, ys &#8212; library type and ls &#8212; library order number will be sufficient in most of cases.</td>
<td>Sales_Planning_skl with code 777701001</td>
</tr>
<tr>
<td>Dlist</td>
<td>The main difference with Cognos initial coding standard. <br />
Dlists are numbered not up by their functions, but by type calculations happening in this dlist. I&#8217;ve got initial table from [Erik Thomsen's OLAP book][1] and modified it to suit EP better. So it goes like this:<br />
<br />1 &#8211; IF-ELSE formulas<br />2 &#8211; *,^, / <br />3 &#8211;  Common Sums <br /> 4 &#8211; Timescale Sums <br /> 5 &#8211; No calculations <br />
Second difference: these numbers are used as suffixes of dlists names, not as prefixes. This allows quick search by first letter of dlist name when you&#8217;re browsing the library and all product dlists will be kept together, regardless of type.<br />
Third rule: only latin names with spaces substituted by _ (underscore). This guarantees that published tables will be named meaningfully and their names won&#8217;t mutate after time (a real problem with cyrillic dlist\dcube names).
</td>
<td>Balance_Sheet_1<br />Products_3<br />Months_4</td>
</tr>
<tr>
<td>Dlist item names</td>
<td>One really useful hint: mark all calculation temporary elements (not to be seen user) with leading # symbol. This allows creating simple saved selection with filter that will easily hide all unnecessary elements from users in Contributor</td>
<td>#temporary_allocation_element</td>
</tr>
<tr>
<td>DCubes</td>
<td>Once again, only latin names with underscores to keep publish tables names sane. Contributor translations allow you to rename these cubes for end users with whatever names they&#8217;d like. No i\o\c, we&#8217;re out of kindergarten</td>
<td>Product_Sales_Global</td>
<tr>
<tr>
<td>Dlinks</td>
<td>&#8220;<" instead of ":" in separating source from target. And some hints like + when you've got an add link, - for subtract, to allow better understanding of link logic while viewing it in update list table.</td>
<td>BalanceSheet&#8221;<"Cashflow(+)</td>
</tr>
<tr>
<td>Macros</td>
<td>Latin verbs or sentences describing what you&#8217;re doing with macro. Latin due to necessity for batch running.</td>
<td>Update_Products_Export_Elists</td>
</tr>
<tr>
<td>Allocation Tables</td>
<td>Similar to links, just the allocated dimensions with some commentaries</td>
<td>ProductGroups&#8221;<"Products</td>
<tr>
<tr>
<td>File Maps</td>
<td>Whatever you like, I prefer filename</td>
<td>pl_export.csv</td>
</tr>
<tr>
<td bgcolor="#DAA0A0" bordercolor="#FFFFFF"><b>Contributor</td>
<td></td>
<td></td>
</tr>
<tr>
<td>Applications</td>
<td>Rather strict rules are implied by Contributor itself, so i&#8217;d just advise to name aplications meaningfully, given that these names will always appear in browser connection string. No doubt that seeing &#8220;sales_plan_v8_will_it_ever_work&#8221; will ensure users. No grammar mistakes or typos, please.</td>
<td>sales_plan_by_brands</td>
</tr>
<tr>
<td>Access Tables</td>
<td>Access Tables should <u>always</u> be named. It&#8217;s best to write a short sentence, describing access table meaning</td>
<td>Closing product list based on managers responsibility</td>
</tr>
<tr>
<td>Saved selections</td>
<td>Plain common sense: explain what this selection selects )</td>
<td>Accounts_special_calc_items</td>
</tr>
<tr>
<td>Administration links</td>
<td>Need suggestions here. <br />Since Administration link is a pack of links, I use macro notation &#8212; verbs describing the process, but I put target application first</td>
<td>sales_plan_by_brands update from regions</td>
</tr>
<tr>
<td>Macros</td>
<td>Need suggestions here too. <br />Again some action descriptions, but I don&#8217;t have a common approach of separating macros by applications they&#8217;re working with or smth like that. Moreover macros aren&#8217;t grouped anyhow, so I sometimes tend to prefix macros with some block group with following description</td>
<td>Sales_submission sales by brands to sales by regions</td>
</tr>
<tr>
<td>System Links</td>
<td>These are for users, so names should be descriptive actions</td>
<td>Load new currency rates</td>
</tr>
</table>
<p><s>Whoa, it&#8217;s a really huge document, maybe I&#8217;ll it finish someday&#8230;</s></p>
<p>  [1]: http://www.amazon.com/OLAP-Solutions-Building-Multidimensional-Information/dp/0471400300</p>
]]></content:encoded>
			<wfw:commentRss>http://ykud.com/blog/analyst/enterprise-planning-objects-naming-convention/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Sitekeeping</title>
		<link>http://ykud.com/blog/blogging/sitekeeping</link>
		<comments>http://ykud.com/blog/blogging/sitekeeping#comments</comments>
		<pubDate>Tue, 22 Apr 2008 08:07:10 +0000</pubDate>
		<dc:creator>ykud</dc:creator>
				<category><![CDATA[blogging]]></category>

		<guid isPermaLink="false">http://ykud.com/blog/?p=213</guid>
		<description><![CDATA[During site cleanup renamed EP cookbook into EP&#038;BI cookbook: now it contains links to bi advices and topics as well. Added some other site modifications. Though I guess I&#8217;d have to move to another hosting to make it work faster. But compared to cognos communities it&#8217;s a f1 car even now (kicking the dead horse, [...]]]></description>
			<content:encoded><![CDATA[<p>During site cleanup renamed EP cookbook into <a href="http://ykud.com/blog/?page_id=148">EP&#038;BI cookbook</a>: now it contains links to bi advices and topics as well.<br />
Added some other site modifications. Though I guess I&#8217;d have to move to another hosting to make it work faster. But compared to cognos communities it&#8217;s a f1 car even now (kicking the dead horse, heh-heh).</p>
]]></content:encoded>
			<wfw:commentRss>http://ykud.com/blog/blogging/sitekeeping/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Oracle Model clause in real-life )</title>
		<link>http://ykud.com/blog/bicpm/using-oracle-model-clause-in-real-life</link>
		<comments>http://ykud.com/blog/bicpm/using-oracle-model-clause-in-real-life#comments</comments>
		<pubDate>Tue, 01 Apr 2008 13:00:48 +0000</pubDate>
		<dc:creator>ykud</dc:creator>
				<category><![CDATA[BI&CPM]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[bi]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://ykud.com/blog/?p=209</guid>
		<description><![CDATA[I&#8217;ve been a long-term fan of oracle model by clause, talking about here and there, doing some small&#038;funny examples (like eight queens solution in one select) but lacked some real-life necessity to use it. It always turned out that partition by was enough, or some tricky analytical function was already built-in (like trend calculations I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been a long-term fan of <a href="http://www.dbasupport.com/oracle/ora10g/model.shtml">oracle model by</a> clause, talking about here and there, doing some small&#038;funny examples (like <a href="http://en.wikipedia.org/wiki/Eight_queens_puzzle">eight queens</a> solution in one select) but lacked some real-life necessity to use it. It always turned out that partition by was enough, or some tricky analytical function was already built-in (like trend calculations I <a href="http://ykud.com/blog/?p=201">wrote about</a>).<br />
And at last, I&#8217;ve encountered a suitable problem.</p>
<p>Task is quite simple&#038;straightforward: calculate number of periods in which current stock will be sold in a store. Like: today we have sales enough for 3 weeks. That&#8217;s a very common sales demand analysis parameter (Months of Sales (MoS), Weeks of Sales (WoS), DoS and etc).</p>
<p>Formula is quite simple: Current Stock / Average Sales over some period</p>
<p>But there were some difficulties in my case.<br />
<span id="more-130"></span><br />
I&#8217;ve got only partial data, some periods were completely missing, and the requirement was to treat missing sales data as zeros. And I also had to get the last known stock as current stock, because stock data could be missing too.<br />
Last stock is pretty easy to get using last_value oracle function, but getting average sales is hard. You cannot use fixed window width in partition by, since data can be missing. Moreover period varied other the years, so I&#8217;ve ended up adding up a field in time dimension called periods_ago, that contained time_key reference from which to sum sales.</p>
<p>So I&#8217;ve started with simple subqueries</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="plsql"><pre class="de1"><span class="kw1">SELECT</span>
        time_key<span class="sy0">,</span>
        product<span class="sy0">,</span>
        company<span class="sy0">,</span>
        sales_qty<span class="sy0">,</span>
        <span class="br0">&#40;</span><span class="kw1">SELECT</span> <span class="kw2">SUM</span><span class="br0">&#40;</span>sales_qty<span class="br0">&#41;</span>
           <span class="kw1">FROM</span> dwh<span class="sy0">.</span>sales sales2
         <span class="kw1">WHERE</span>
            sales2<span class="sy0">.</span>product <span class="sy0">=</span> sales<span class="sy0">.</span>product<span class="sy0">,</span>
            sales2<span class="sy0">.</span>company <span class="sy0">=</span> sales<span class="sy0">.</span>company<span class="sy0">,</span>
            sales2<span class="sy0">.</span>time_key <span class="kw1">BETWEEN</span> weeks<span class="sy0">.</span>periods_ago <span class="kw1">AND</span> sales<span class="sy0">.</span>time_key
        <span class="br0">&#41;</span> <span class="kw1">AS</span> running_sales_sum
<span class="kw1">FROM</span>
        dwh<span class="sy0">.</span>time_dim weeks<span class="sy0">,</span> dwh<span class="sy0">.</span>sales sales
        <span class="kw1">WHERE</span>
           weeks<span class="sy0">.</span>key <span class="sy0">=</span> sales<span class="sy0">.</span>time_key</pre></div></div></div></div></div></div></div>


<p>and that is terribly slow on 10^6+ rows. ~20 minutes.</p>
<p>But with model by it&#8217;ll be like:</p>


<div class="wp-geshi-highlight-wrap5"><div class="wp-geshi-highlight-wrap4"><div class="wp-geshi-highlight-wrap3"><div class="wp-geshi-highlight-wrap2"><div class="wp-geshi-highlight-wrap"><div class="wp-geshi-highlight"><div class="plsql"><pre class="de1"><span class="kw1">SELECT</span>
        <span class="kw1">TIME</span><span class="sy0">,</span>
        product<span class="sy0">,</span>
        company<span class="sy0">,</span>
        sales_qty<span class="sy0">,</span>
        last_stock_qty
<span class="kw1">FROM</span>
        dwh<span class="sy0">.</span>time_dim weeks<span class="sy0">,</span> dwh<span class="sy0">.</span>sales sales
        <span class="kw1">WHERE</span>
           weeks<span class="sy0">.</span>key <span class="sy0">=</span> sales<span class="sy0">.</span>time_key
      model
        IGNORE NAV
          <span class="kw1">PARTITION</span> <span class="kw1">BY</span> <span class="br0">&#40;</span>product<span class="sy0">,</span>company<span class="br0">&#41;</span>
            dimension <span class="kw1">BY</span> <span class="br0">&#40;</span>time_key<span class="br0">&#41;</span>
            measures
            <span class="br0">&#40;</span>
                periods_ago<span class="sy0">,</span>
                sales_qty<span class="sy0">,</span>
                <span class="nu0">0</span> eight_weeks_sales_sum_qty<span class="sy0">,</span>
                <span class="kw2">NVL</span><span class="br0">&#40;</span><span class="kw2">LAST_VALUE</span><span class="br0">&#40;</span>STOCK IGNORE NULLS<span class="br0">&#41;</span>
                OVER <span class="br0">&#40;</span><span class="kw1">PARTITION</span> <span class="kw1">BY</span> COMPANY<span class="sy0">,</span> PRODUCT<span class="sy0">,</span> SEGMENT<span class="sy0">,</span> DISTRIB_LEVEL<span class="sy0">,</span> SYSTEM
                <span class="kw1">ORDER</span> <span class="kw1">BY</span> <span class="kw1">TIME</span> <span class="kw1">ASC</span><span class="br0">&#41;</span><span class="sy0">,</span><span class="nu0">0</span><span class="br0">&#41;</span> <span class="kw1">AS</span> last_stock_qty
            rules   <span class="kw1">UPDATE</span>
            <span class="br0">&#40;</span>
                running_sales_sum<span class="br0">&#91;</span><span class="kw1">ANY</span><span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw2">SUM</span><span class="br0">&#40;</span>sales_qty<span class="br0">&#41;</span><span class="br0">&#91;</span><span class="kw1">TIME</span> <span class="kw1">BETWEEN</span> periods_ago<span class="br0">&#91;</span>cv<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#93;</span> <span class="kw1">AND</span> cv<span class="br0">&#40;</span>time_key<span class="br0">&#41;</span><span class="br0">&#93;</span>
                            <span class="kw1">END</span>
			<span class="br0">&#41;</span>
&nbsp;
&nbsp;
            <span class="br0">&#41;</span></pre></div></div></div></div></div></div></div>


<p>around 3 minutes ) Notice the last stock calculation.</p>
<p>Here&#8217;s a couple links to good model by examples:<br />
<a href="http://www.sqlsnippets.com/en/topic-11667.html">A wonderful tutorial at SQLSnippets</a><br />
<a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/sqlmodel.htm#i1011720">Official documentation restriction section</a> &#8212; read that carefully</p>
]]></content:encoded>
			<wfw:commentRss>http://ykud.com/blog/bicpm/using-oracle-model-clause-in-real-life/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title></title>
		<link>http://ykud.com/blog/blogging/192</link>
		<comments>http://ykud.com/blog/blogging/192#comments</comments>
		<pubDate>Tue, 11 Dec 2007 12:08:42 +0000</pubDate>
		<dc:creator>ykud</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://ykud.com/blog/?p=192</guid>
		<description><![CDATA[Updated my blogroll, categorized links and synchronized with google reader&#8217;s feed list (at 1 to 10 rate). Those of you who read this blog by feed readers may find it interesting to take a look. I recommend all the listed feeds.]]></description>
			<content:encoded><![CDATA[<p>Updated my blogroll, categorized links and synchronized with google reader&#8217;s feed list (at 1 to 10 rate).<br />
Those of you who read this blog by feed readers may find it interesting to take a look. I recommend all the listed feeds.</p>
]]></content:encoded>
			<wfw:commentRss>http://ykud.com/blog/blogging/192/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vacation</title>
		<link>http://ykud.com/blog/blogging/vacation</link>
		<comments>http://ykud.com/blog/blogging/vacation#comments</comments>
		<pubDate>Sat, 04 Aug 2007 13:04:35 +0000</pubDate>
		<dc:creator>ykud</dc:creator>
				<category><![CDATA[blogging]]></category>

		<guid isPermaLink="false">http://ykud.com/blog/?p=176</guid>
		<description><![CDATA[I&#8217;m out for two weeks, at last. Will be around world deepest lake. Lucky me )]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m out for two weeks, at last. <br />Will be around <a href="http://en.wikipedia.org/wiki/Baikal">world deepest lake</a>. Lucky me )</p>
]]></content:encoded>
			<wfw:commentRss>http://ykud.com/blog/blogging/vacation/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Anniversary</title>
		<link>http://ykud.com/blog/blogging/anniversary</link>
		<comments>http://ykud.com/blog/blogging/anniversary#comments</comments>
		<pubDate>Sat, 07 Jul 2007 20:41:21 +0000</pubDate>
		<dc:creator>ykud</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[cognos]]></category>

		<guid isPermaLink="false">http://ykud.com/blog/?p=171</guid>
		<description><![CDATA[Got so overflowed with work that missed the 1st year anniversary of this blog. Time flew really fast, I must admit. Thank you all for reading. And writing back. Some stats: around 10 unique hits a day to total of around 4k, quite as much feed readers, mostly from USA&#38;Europe. And from Australia, Taiwan, Japan [...]]]></description>
			<content:encoded><![CDATA[<p>Got so overflowed with work that missed the 1st year anniversary of this blog. <br />Time flew really fast, I must admit. <br />Thank you all for reading. And writing back. </p>
<p>Some stats: around 10 unique hits a day to total of around 4k, quite as much feed readers, mostly from USA&amp;Europe. And from Australia, Taiwan, Japan even New Zealand&nbsp; and more-more-more. I expected more local readers, but it&#8217;s even better for me. Almost no direct competitors reading ) </p>
<p>Since I&#8217;m mostly doing complete EP+BI projects now, MDM problems itch the most. So expect some post on this theme.<br />And some on huge elist problems (I&#8217;m testing a 15k elist app currently). </p>
]]></content:encoded>
			<wfw:commentRss>http://ykud.com/blog/blogging/anniversary/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

