dbTalk Databases Forums  

SSAS 2000: performance TopCount against Head

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


Discuss SSAS 2000: performance TopCount against Head in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Edwardvb (Offline)
Junior Member
 
Posts: 5
Join Date: May 2006

Default SSAS 2000: performance TopCount against Head - 06-01-2006 , 02:59 AM






Hi,

Does anyone know if there is any performance difference between de "TopCount()-function" and the "Head()-function combined with the Order()-function"?
and similarly between the "BottomCount()-function" and the "Tail()-function combined with the Order()-function"?

Greetings,

Edward

Reply With Quote
  #2  
Old   
Deepak Puri
 
Posts: n/a

Default Re: SSAS 2000: performance TopCount against Head - 06-01-2006 , 10:25 AM






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
...
Quote:

- Deepak

Deepak Puri
Microsoft MVP - SQL Server

*** Sent via Developersdex http://www.developersdex.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.