dbTalk Databases Forums  

Aggregation

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


Discuss Aggregation in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ben
 
Posts: n/a

Default Aggregation - 01-10-2006 , 06:23 AM






Hi,

Sorry to ask so many questions around the same topic.

I have 2 MDX queries running through the sample app. Both use the same
selction criteria. One does aggregation and the other performs
selection using nonemptycrossjoins in the row axis.

The query performing aggregation takes 31 seconds to run and the one
which doesn't takes < 1 second to run. However the query performing
aggregation provides the exact answer I want. At this time I am using
very limited selection and having done some benchmarks the aggregation
query takes twice as long for every new axis or 1 or 2 new items on an
existing axis added. For my purposes this is far too slow (although
the result is excellent when it does arrive!). I am Creating Members
to perform the aggregation.

The sample query with aggregation is -

WITH
MEMBER [A].[MY_MEMBER] as 'SUM({[A].[All A].[3], [Ad].[All A].[10]},
[Measures].[PP])'
MEMBER [b].[MY_MEMBER] as 'SUM( {[b].[All B].[0], [b].[All B].[1]},
Measures.CURRENTMEMBER)'
MEMBER [FINDQTR].[PeriodAgg] as 'Aggregate({
[FINDQTR].[1994].[Quarter 1]:[FINDQTR].[1995].[Quarter 4]})'
SELECT non empty CROSSJOIN ({[ProfileQtr].Members}
, [Measures].[PP]}) on columns,
Non Empty CrossJoin ({[AnnouncementQtr].[All
AnnouncementQtr].Children}, {[b].[MY_MEMBER]}) on rows FROM Cube
WHERE ([FINDQTR].[PeriodAgg], [A].[MY_MEMBER] )

The question is ...

Is there a far more efficient way to perform the aggregation or is this
not something that MDX can do quickly (I have chosen the wrong tool for
the job).

Thanks,

Ben.


Reply With Quote
  #2  
Old   
Vladimir Chtepa
 
Posts: n/a

Default Re: Aggregation - 01-12-2006 , 04:58 AM






Hi, Ben

What about fiscal year hierarchy? If your fiscal year starts with april, you
can avoid
Aggregate({[FINDQTR].[1994].[Quarter 1]:[FINDQTR].[1995].[Quarter 4]}) and
use real dimension member.

Try instead of 'non empty crossjon()' the 'nonemptycrossjoin()'. It is much
more quick.
There are some tricks with nonemptycrossjoin. Take a look in msdn and news
groups.

Thanks,
Vladimir Chtepa

"Ben" <gringogordo (AT) hotmail (DOT) com> schrieb im Newsbeitrag
news:1136895822.986116.287330 (AT) g43g2000cwa (DOT) googlegroups.com...
Quote:
Hi,

Sorry to ask so many questions around the same topic.

I have 2 MDX queries running through the sample app. Both use the same
selction criteria. One does aggregation and the other performs
selection using nonemptycrossjoins in the row axis.

The query performing aggregation takes 31 seconds to run and the one
which doesn't takes < 1 second to run. However the query performing
aggregation provides the exact answer I want. At this time I am using
very limited selection and having done some benchmarks the aggregation
query takes twice as long for every new axis or 1 or 2 new items on an
existing axis added. For my purposes this is far too slow (although
the result is excellent when it does arrive!). I am Creating Members
to perform the aggregation.

The sample query with aggregation is -

WITH
MEMBER [A].[MY_MEMBER] as 'SUM({[A].[All A].[3], [Ad].[All A].[10]},
[Measures].[PP])'
MEMBER [b].[MY_MEMBER] as 'SUM( {[b].[All B].[0], [b].[All B].[1]},
Measures.CURRENTMEMBER)'
MEMBER [FINDQTR].[PeriodAgg] as 'Aggregate({
[FINDQTR].[1994].[Quarter 1]:[FINDQTR].[1995].[Quarter 4]})'
SELECT non empty CROSSJOIN ({[ProfileQtr].Members}
, [Measures].[PP]}) on columns,
Non Empty CrossJoin ({[AnnouncementQtr].[All
AnnouncementQtr].Children}, {[b].[MY_MEMBER]}) on rows FROM Cube
WHERE ([FINDQTR].[PeriodAgg], [A].[MY_MEMBER] )

The question is ...

Is there a far more efficient way to perform the aggregation or is this
not something that MDX can do quickly (I have chosen the wrong tool for
the job).

Thanks,

Ben.




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.