Category Archives: Begin BI
Basic concepts to understand more on Business Intelligence
I have been working on cube optimization techniques for some time now. And honestly I even got my job for the same requirement. Its actually interesting to work with team of highly qualified MSBI professionals and learn new things on the same field, you were very confident about.
I am starting this as a journal and hoping to cover more and more on the topic gradually. In this way we can achieve a more strong foundation on this topic.
In this post we will cover the aspects where Cube optimization can be applicable/tested actually.
Following are areas we think of when we talk about cube optimization:
- Decreased usual size of cube: we often come in situation where cube is created and being used but it takes a lot of space on server. Cube optimization is mostly focused on decreasing the cube size which can lead to more efficiency in different other areas as well (listed below).
- Decreased processing time of cube: this one is a catch and we always want to achieve. Decrease in processing time can also impact in limiting space of cube, good reporting time, more frequency of data processing. Mostly due to longer time period of processing we decrease frequency of processing and users see a great latency in the report data (talking about MOLAP).
- Fast Reporting: Optimizing MDXs only in SSRS reports cannot give you fast report, it must come from real source “the cube”. And reporting like excel are only as fast as a cube is. We need faster reports for that we need a faster cube.
- “Can you think of any more valid reason anymore?”
Well we can talk about many other less important aspects like Loads on servers, better architecture blah blah . . .but what I believe is in project whats most important aspect is “Client” nothing else is significant more.
Client doesn’t care about populous server till he gets the result and damn if he care about your architecture if he doesn’t get the result he expected. Harsh but true :P.
So I hope using most important aspects for cube optimization. I will start with one of them to cover simple and effective optimization techniques.
I know its looks weird to ask for Rank function”s” in MDX because there is only one for it.
But in SQL we have multiple Rank functions and used under different circumstances for solving different purposes. Those are RANK, ROW_NUMBER, NTILE and DENSE_RANK.
If SQL has it why not in MDX!!!! So I tried to give you few examples so that you can call the functionality of Rank functions of SQL in MDX. I saw few post online but those were so bloody complex that it took time for me to understand what they were trying to do, and yet not much useful.
Below is the Query with different calculated measures and then the screenshot from the result. Calculated measure names are actually based on T+SQL ranking functionality:
So you can study the MDX and result from the post. Here I can explain in detail what I did in MDX for different cases but I believe these example are simplest I can come up with and can be understood easily. Still in case of any doubt or explanation needed please comment and I’ll be ready to help.
These example doesn’t have NTILE but I’ll try to get some time and add alternative for it later.