This earlier thread should help you - "k" is the number of members
returned by TopCount and "n" is the set size:
http://groups.google.com/group/micro...olap/msg/97c28
5139374d4d3
Quote:
|
MDX Rank function - how to use it efficiently?
|
From: Mosha Pasumansky [MS]
Date: Tues, Dec 14 2004 8:43 pm
Groups: microsoft.public.sqlserver.olap
Quote:
I'm puzzled by why TopCount(), as you used it, would out-perform
Order(), since it's ordering the same number of members - doing the
same
thing. |
Actually no - algorithm for TopCount doesn't need to order the set, but
Order needs to. So Order is nlog(n), while TopCount is only nlog(k)
which is
for small k's is same as n.
--
==================================================
Mosha Pasumansky - http://www.mosha.com/msolap
Analysis Services blog at http://www.sqljunkies.com/WebLog/mosha
Development Lead in the Analysis Server team
...
- Deepak
Deepak Puri
Microsoft MVP - SQL Server
*** Sent via Developersdex http://www.developersdex.com ***