Named Sets and Block Computation in SSAS 2012

0

Posted on : 16-05-2012 | By : Ben Stinner | In : Analytics

Greg Galloway (who really should blog more often!) recently came across an otherwise undocumented query performance optimisation in SSAS 2012: using named sets inside aggregate functions in MDX no longer prevents the use of block computation/bulk mode. This was something that was explicitly called out as a Bad Thing To Do in Books Online (the link to the page in question is now dead though, possibly because it’s being updated), but here’s an example of a query that will now run much faster in SSAS 2012 Multidimensional than it used to in R2:

with
set myset as {[Customer].[Customer].[Customer].members}
member measures.demo as
sum(myset,[Measures].[Internet Sales Amount])
select measures.demo on 0,
[Date].[Calendar Year].members on 1
from [Adventure Works]

There are still situations where block computation can’t be used however, namely when the Current() function is used (which are going to be very rare I think):

with
set myset as {[Customer].[Customer].[Customer].members}
member measures.demo as
sum(myset
, iif(myset.current is [Customer].[Customer].[20075]
, 0, [Measures].[Internet Sales Amount])
)
select measures.demo on 0,
[Date].[Calendar Year].members on 1
from [Adventure Works]

Thanks also to Jeffrey Wang for the background on this.

Article source: http://feedproxy.google.com/~r/wordpress/Cpjz/~3/lh1dw_b5LEk/

  • wp socializer sprite mask 16px Named Sets and Block Computation in SSAS 2012
  • wp socializer sprite mask 16px Named Sets and Block Computation in SSAS 2012
  • wp socializer sprite mask 16px Named Sets and Block Computation in SSAS 2012
  • wp socializer sprite mask 16px Named Sets and Block Computation in SSAS 2012
  • wp socializer sprite mask 16px Named Sets and Block Computation in SSAS 2012
  • wp socializer sprite mask 16px Named Sets and Block Computation in SSAS 2012
  • wp socializer sprite mask 16px Named Sets and Block Computation in SSAS 2012
  • wp socializer sprite mask 16px Named Sets and Block Computation in SSAS 2012

Share this :

  • Stumble upon
  • twitter

Post a comment