dbTalk Databases Forums  

More distinct count with calculated measure

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


Discuss More distinct count with calculated measure in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
suspi@lycos.com
 
Posts: n/a

Default More distinct count with calculated measure - 12-28-2004 , 10:12 AM






Is it possible to use a calculated measure to avoid one distinct count
per cube limitation ?
Any example of MDX query would be very helpful.

Thanx,

Radek


Reply With Quote
  #2  
Old   
Thomas Kejser
 
Posts: n/a

Default Re: More distinct count with calculated measure - 01-02-2005 , 08:02 AM






Or... you could combine several cubes with distinct counts into a virtual
cube

Be aware however that distinct counts are real performance hogs if you
cannot aggregate you cube to 100%

Yours sincerely
Thomas Kejser

<suspi (AT) lycos (DOT) com> wrote

Quote:
Is it possible to use a calculated measure to avoid one distinct count
per cube limitation ?
Any example of MDX query would be very helpful.

Thanx,

Radek




Reply With Quote
  #3  
Old   
tarana halsall via SQLMonster.com
 
Posts: n/a

Default Re: More distinct count with calculated measure - 01-02-2005 , 08:41 AM



Are distinct count cubes slow to query or slow to process/build?

Are there any alternates to a distinct count? I guess i could set a 1/0 flag and sum it up, but setting the 1 and 0 to simulate a distinct count scenario will be somewhat complex.

thanks in advance

--
Message posted via http://www.sqlmonster.com

Reply With Quote
  #4  
Old   
Thomas Kejser
 
Posts: n/a

Default Re: More distinct count with calculated measure - 01-02-2005 , 11:03 AM



Hi Tarana

Distinct counts are generally very slow til process because of their nature.
If you do not aggregate to 100% they can also be very slow to query,
depending on the amount of indexing you have done on you relational database
fact table (since every aggregate that does not exist must be explicitly
queried)

If you can get away with a 1/0 flag (which you sometimes can) you should
definately try that approach - especially so if you cube is large. However,
be aware that distinct count in a multi dimensional world can only rarely be
simulated in the relational world with 1/0 flags. The problem is - that the
count will normally not be distinct across all dimensions - however, you may
be able to live with this in your scenario.

Yours sincerely
Thomas Kejser





"tarana halsall via SQLMonster.com" <forum (AT) SQLMonster (DOT) com> wrote

Quote:
Are distinct count cubes slow to query or slow to process/build?

Are there any alternates to a distinct count? I guess i could set a 1/0
flag and sum it up, but setting the 1 and 0 to simulate a distinct count
scenario will be somewhat complex.

thanks in advance

--
Message posted via http://www.sqlmonster.com



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.