任何人都可以解释原因
SELECT
NON EMPTY {Hierarchize({[Measures].[Quantity]})} ON COLUMNS,
NON EMPTY ([Time].[Years].Members * [Markets].[City].Members * [Product].[Product].Members * [Customers].[Customer].Members) ON ROWS
FROM [SteelWheelsSales]
比这慢得多:
SELECT
NON EMPTY {Hierarchize({[Measures].[Quantity]})} ON COLUMNS,
NON EMPTY CrossJoin([Time].[Years].Members, CrossJoin([Markets].[City].Members, CrossJoin([Product].[Product].Members, [Customers].[Customer].Members))) ON ROWS
FROM [SteelWheelsSales]
我想使用*运算符来制作交叉连接,但它看起来要慢得多。知道为什么以及我能做什么?
答案 0 :(得分:0)
以防上述链接将来死亡,它基本上比较了以下两个AdvWks脚本的性能:
QUERY 1
WITH MEMBER Measures.PerfmonTest AS
Count(
Crossjoin( [Promotion].[Promotions].[Promotion] ,
Filter([Customer].[Customer Geography].[Customer], RIGHT([Customer].[Customer Geography].CurrentMember.Name,5) = "Smith")
)
)
SELECT Measures.PerfmonTest ON Columns
FROM [Adventure Works]
QUERY 2
WITH MEMBER Measures.PerfmonTest AS
Count(
Crossjoin(
Filter([Customer].[Customer Geography].[Customer], RIGHT([Customer].[Customer Geography].CurrentMember.Name,5) = "Smith")
,[Promotion].[Promotions].[Promotion] )
)
SELECT Measures.PerfmonTest ON Columns
FROM [Adventure Works]