dbTalk Databases Forums  

NonEmpty( a * b ...) optimizations...

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


Discuss NonEmpty( a * b ...) optimizations... in the microsoft.public.sqlserver.olap forum.



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

Default NonEmpty( a * b ...) optimizations... - 11-03-2006 , 01:03 AM






Hello,

I have in one MDX something like

NonEmpty(
descendants(a.currentmember,leaves) *
descendants(b.currentmember,leaves) *
descendants(c.currentmember,leaves) *
descendants(d.currentmember,leaves),
measures.sales
)

The a and b dimensiopn are quite big (customers and products).

Is the following approach better?

NonEmpty(
NonEmpty(descendants(a.currentmember,leaves) ,measures.sales ) *
NonEmpty(descendants(b.currentmember,leaves) , measures.sales) *
descendants(c.currentmember,leaves) *
descendants(d.currentmember,leaves),
measures.sales
)


Do you have any ideea?

Thanks,
Radu



Reply With Quote
  #2  
Old   
Ohjoo Kwon
 
Posts: n/a

Default Re: NonEmpty( a * b ...) optimizations... - 11-06-2006 , 03:25 AM






I expect query optimizer will do NonEmpty on each in second expression, and
then perform inner join of the results.
So, I guess second one is more effective and the order of dimension is also
important.

I also wish more good information on this.

Ohjoo


"Radu Colceriu" <radu_colceriu (AT) hotmail (DOT) com> wrote

Quote:
Hello,

I have in one MDX something like

NonEmpty(
descendants(a.currentmember,leaves) *
descendants(b.currentmember,leaves) *
descendants(c.currentmember,leaves) *
descendants(d.currentmember,leaves),
measures.sales
)

The a and b dimensiopn are quite big (customers and products).

Is the following approach better?

NonEmpty(
NonEmpty(descendants(a.currentmember,leaves) ,measures.sales ) *
NonEmpty(descendants(b.currentmember,leaves) , measures.sales) *
descendants(c.currentmember,leaves) *
descendants(d.currentmember,leaves),
measures.sales
)


Do you have any ideea?

Thanks,
Radu




Reply With Quote
  #3  
Old   
Radu Colceriu
 
Posts: n/a

Default Re: NonEmpty( a * b ...) optimizations... - 11-08-2006 , 05:22 AM



After testing both MDX I've got a very strange result:

The second approach uses much less memory (1.6G first approach, 200M
second approach) but there is no speed increase for the second approach.


-Radu



Ohjoo Kwon wrote:
Quote:
I expect query optimizer will do NonEmpty on each in second expression, and
then perform inner join of the results.
So, I guess second one is more effective and the order of dimension is also
important.

I also wish more good information on this.

Ohjoo


"Radu Colceriu" <radu_colceriu (AT) hotmail (DOT) com> wrote in message
news:OECSSSx$GHA.4428 (AT) TK2MSFTNGP04 (DOT) phx.gbl...
Hello,

I have in one MDX something like

NonEmpty(
descendants(a.currentmember,leaves) *
descendants(b.currentmember,leaves) *
descendants(c.currentmember,leaves) *
descendants(d.currentmember,leaves),
measures.sales
)

The a and b dimensiopn are quite big (customers and products).

Is the following approach better?

NonEmpty(
NonEmpty(descendants(a.currentmember,leaves) ,measures.sales ) *
NonEmpty(descendants(b.currentmember,leaves) , measures.sales) *
descendants(c.currentmember,leaves) *
descendants(d.currentmember,leaves),
measures.sales
)


Do you have any ideea?

Thanks,
Radu




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.