dbTalk Databases Forums  

MDX question - using "on pages" instead of "where"?

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss MDX question - using "on pages" instead of "where"? in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Kaisa M. Lindahl
 
Posts: n/a

Default MDX question - using "on pages" instead of "where"? - 07-06-2005 , 08:32 AM






I was doing a workshop today with some coworker who wanted to learn some
things about MDX. I'm still a novice, but I could at least point them in the
right direction.

When we talked about slicing, I said that in my experience, the more slicing
you can do in the select statement, and the less you do in the where-clause,
the faster the query runs. We were looking at queries using
Select {whatever} on columns
descendants([User].&[107], 0, self_and_after) on rows
from [MyCube]
where ([TranasctionType].[Hours], [Date].[200501])
rather than

Select {whatever} on columns
{[user].members} on rows
from [MyCube]
where ([TranasctionType].[Hours], [Date].[200501], [UserDept].&[107])

(Using [UserDept] to not interfere with [User] on rows)

Then one of the others asked if the query would run even faster if we moved
the where clause to "on pages" instead. So we tried, changing the first
statement to something like this:
Select {whatever} on columns
descendants([User].&[107], 0, self_and_after) on rows,
non empty crossjoin({[TranasctionType].[Hours]},{[Date].[200501]}) on pages
from [MyCube]

We didn't really see a big improvement in speed at first, and can't really
trace it, but it looks like it's a bit faster than the first statement. But
my question is: Will it actually give us the same result? Off course, I can
do it again and again, and see if I get the same numbers. But is the concept
right? Is it OK to use "On pages" instead of "where" like this? If not, who
not?

Kaisa M. Lindahl



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.