SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Why is the results take longer in MDX than TSQL?


Why is the results take longer in MDX than TSQL?

Author
Message
Wood Chuck
Wood Chuck
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 93
Can anyone tell me why this simple MDX query takes 9 seconds and TSQL takes 5 seconds?

-------------------- MDX -------------------------------
select null on 0,
{
[Dim Geographic].[STATECODE].children *
[Dim Geographic].[COUNTYNAME].children *
[Dim Geographic].[CITY].children *
[Dim Geographic].[POSTALCODE].children
}
on 1 from Cube;

------------------TSQL----------------------------------

select distinct STATEABBRV, COUNTYNAME, CITY, POSTALCODE from DimGeographic
order by STATEABBRV, COUNTYNAME, CITY, POSTALCODE
Koen Verbeeck
Koen Verbeeck
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27527 Visits: 13268
Hard to tell without knowing the exact structures of the database and cube, but I do know SSAS is strong in showing aggregated data, not really in showing data dumps.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
blom0344
blom0344
SSC-Enthusiastic
SSC-Enthusiastic (152 reputation)SSC-Enthusiastic (152 reputation)SSC-Enthusiastic (152 reputation)SSC-Enthusiastic (152 reputation)SSC-Enthusiastic (152 reputation)SSC-Enthusiastic (152 reputation)SSC-Enthusiastic (152 reputation)SSC-Enthusiastic (152 reputation)

Group: General Forum Members
Points: 152 Visits: 330
Did the T-sql take 5 seconds on the first execution? If not , then results may still be in the memory cache. The MDX may not have that advantage.
Koen Verbeeck
Koen Verbeeck
One Orange Chip
One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)One Orange Chip (27K reputation)

Group: General Forum Members
Points: 27527 Visits: 13268
blom0344 (1/16/2013)
Did the T-sql take 5 seconds on the first execution? If not , then results may still be in the memory cache. The MDX may not have that advantage.


SSAS holds caches for MDX as well.

Clear the Analysis Services Caches


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search