优化SUM MDX

时间:2017-03-24 18:57:29

标签: optimization mdx

我有一个大型MDX查询,历史上在25秒内运行;这很好。我最近做了下面概述的更改,现在运行时间超过90秒。

我担心如果我需要执行类似的过滤器,这只会加剧问题。有关如何更有效地为MDX执行此类过滤器的任何建议吗?

// My simple aggregation of all hours runs in 25 seconds
MEMBER [Measures].[Calc_TotalHours] AS
    ([Measures].[PostedHours] + [Measures].[UnpostedHours])

// The same aggregation that excludes a certain type of hours
MEMBER [Measures].[Calc_TotalHours] AS
    SUM ( -{ [Activity].[ProjectCategoryName].&[Overtime] }
             , ([Measures].[ActualHours] + [Measures].[TimeSheetHours_Unposted]) 
        )

我想知道SUM是否在这里使用错误的功能?

1 个答案:

答案 0 :(得分:2)

你是对的,Sum()函数对大集合很重要。尝试重用预先聚合的所有成员:

7bit
相关问题