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 |