saiku mdx与* operator for crossjoin的性能问题

时间:2015-01-21 14:01:10

标签: mdx mondrian saiku

任何人都可以解释原因

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]

我想使用*运算符来制作交叉连接,但它看起来要慢得多。知道为什么以及我能做什么?

1 个答案:

答案 0 :(得分:0)

似乎订单很重要: http://community.altiusconsulting.com.ourwindowsnetwork.com/blogs/altiustechblog/archive/2008/06/13/mdx-crossjoin-performance.aspx

以防上述链接将来死亡,它基本上比较了以下两个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]