1

I am trying to work out why an SSRS 2008 R2 report keeps timing out.

Unfortunately I am not familiar with MDX (although I did read up little about it).

So basically I would like to know whether the MDX is not good (because it might have been generated by the designer etc) or because there could be an issue with the cube design. I would lean towards cube design because I am told that at one point this query ran fine, but then it may be because there's more data now - i dunno.

SELECT NON EMPTY { [Measures].[Unpaid Sick Hours], [Measures].[Paid Sick Hours], 

[Measures].[All Timecard Hours]
            , [Measures].[Paid Sick Incidents], [Measures].[% Sick Time] } 
ON COLUMNS, NON EMPTY { ([Position].[Position Number].[Position Number].ALLMEMBERS 
            * [Position].[Position Title].[Position Title].ALLMEMBERS 
            * [Union].[Union].[Union].ALLMEMBERS 
            * [Time].[Day Of Week].[Day Of Week].ALLMEMBERS 
            * [Employee].[Employee Type].[Employee Type].ALLMEMBERS 
            * [Employee].[Employee Number].[Employee Number].ALLMEMBERS 
            * [Employee].[Employee First Name].[Employee First Name].ALLMEMBERS 
            * [Employee].[Employee Last Name].[Employee Last Name].ALLMEMBERS ) } 
            DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME 

ON ROWS FROM ( SELECT ( STRTOSET("[Time].[Fiscal Year-Quarter-Month].[F Quarter].&[20124]", CONSTRAINED) ) 
ON COLUMNS FROM ( SELECT ( STRTOSET("[Cost Centre].[Cost Centre Hierarchy].&[1002]", CONSTRAINED) ) 
ON COLUMNS FROM [Contoso HR])) 

Appreciate the help.

thanks, KS

4

2 回答 2

2

有几点需要考虑:

  1. 如前所述,* 表示 CROSS JOIN,而 CROSS JOINS 确实有性能损失。拥有尽可能多的东西会让你头疼。一个短期的选择是尝试NonEmptyCrossjoin

  2. 您正在多次对 [Position] 和 [Employee] 进行 CROSS JOIN。您是否可以使用 [Employee Number] 交叉加入 [Employee],并使用成员属性获取 [Employee Type]、[Employee First Name]、[Employee Last Name]

  3. 多维数据集是否来自 SQL Server 数据库?如果是这样,鉴于该报告的输出似乎相当平淡。我会放弃 MDX 并简单地使用 SQL 来收集数据。

于 2013-03-19T15:46:48.770 回答
1

MDX 看起来相当直接......我们在这里谈论多少数据?这些措施有多复杂?除了 [%sick time] 之外,它们都是基本措施吗?

当我有一个没有执行的 MDX 查询时,我做的第一件事就是在 MDX studio 中运行它,看看它是如何被 SSAS 引擎处理的。

于 2013-03-18T18:36:32.610 回答