很厲害,我有MDX和SSAS很少的經驗,所以不知道從哪裏開始的這:快速MDX查詢的SSAS 2012
我們正在從一個SQL 2005環境遷移到SQL 2012。在SSAS 2005上,下面的查詢在大約3到4秒內運行。在SSAS 2012上運行相同的查詢時,它會在完成之前運行高達1小時58分鐘。任何人都可以闡明爲什麼表現如此糟糕,以及如何改進?我們在SQL 2012 11.0.5532.0(X64)上。
非常感謝。
with member [Measures].[Calculation] as
Format(
IIF(isempty([Measures].[average complience to requirements]), null,
[Measures].[average complience to requirements]),
"#,0.00"
)
select
non empty
{
[Measures].[average complience to requirements],
[Measures].[Calculation]
} on 0,
nonempty
(
[Customer].[App Key Company Id].children *
[Location].[App Key Region Id].children *
[Category].[App Key Category Id].children *
[Vendor].[App Key Vendor Id].children,
[average complience to requirements]
) on 1
from
[BSC]
where
(
strtomember(
"[Date Submitted Date].[YYYY-MMMM-DD].[Month Of Year].&[" + Format(Now(), "yyyyMM") + "]"
):
strtomember(
"[Date Submitted Date].[YYYY-MMMM-DD].[Month Of Year].&[" + Format(Now(), "yyyyMM") + "]").Lag(2)
)
請回答以下問題:1.「BSC」立方體中是否有分區? 2.「日期提交日期」維度成員是否大於當前月份? –
爲什麼在兩個座標軸中選擇'[平均滿足要求]?將其從'AXIS(1)' – SouravA
@AlexPeshik中刪除要回答您的問題:1.否2.否 – user2460549