1

我们正在尝试创建一个计算度量来计算另一个度量的运行总计。考虑到数据量并不大,我们怎样才能让这个查询更快呢?

 WITH MEMBER [Measures].[X] AS aggregate 
 (
  {Null:[Transaction Date].CurrentMember},
  [Measures].[Transaction Amount]
 )
SELECT
 non empty {
  [Measures].[X]
 } ON columns
 , 
 non empty {
  ([Claim].[Claim Number].children* 
  [Transaction Date].[Hierarchy].[Day].&[2013-02-28T00:00:00]
  )
 } 
 ON rows
 FROM [ClaimsCube]
4

1 回答 1

1

尝试删除“非空”

WITH MEMBER [Measures].[X] AS aggregate 

(
  {Null:[Transaction Date].CurrentMember},
  [Measures].[Transaction Amount]
 )
SELECT
 {
  [Measures].[X]
 } ON columns
 , 
 {
  ([Claim].[Claim Number].children* 
  [Transaction Date].[Hierarchy].[Day].&[2013-02-28T00:00:00])
 } 
 ON rows
 FROM [ClaimsCube]
于 2013-04-07T01:37:34.190 回答