SSAS在集合中的16个以上成员上进行过多的分区扫描

SSAS在集合中的16个以上成员上进行过多的分区扫描,ssas,mdx,Ssas,Mdx,如果我在axis上放置了一组超过16个成员,SSAS2012将扫描所有度量值组分区。 如果输入15或更少,则只扫描一个分区 为了检查这个问题,我创建了一个非常简单的多维数据集,其中包含Sales measure和Dates维度 下面是一个示例查询,它是虚拟的,因此它只为1轴上集合中的每个成员返回相同的VAL: with member val as aggregate ( [Dates].[Calendar].[DateId].&[

如果我在axis上放置了一组超过16个成员,SSAS2012将扫描所有度量值组分区。 如果输入15或更少,则只扫描一个分区

为了检查这个问题,我创建了一个非常简单的多维数据集,其中包含Sales measure和Dates维度

下面是一个示例查询,它是虚拟的,因此它只为1轴上集合中的每个成员返回相同的VAL:

with
member val as aggregate
             (
                [Dates].[Calendar].[DateId].&[20100101]:[Dates].[Calendar].[DateId].&[20100102],
                [Measures].[Amount]
             )
select 
        val on 0,
        head([Dates].[Calendar].[DateId].members, 16)  on 1
from [SSDDB]
他的核心功能是在实际查询中聚合2天,您可以期望看到MTD而不是静态范围。轴坐标甚至不会严重影响val成员,它们只是一些虚拟值的范围

当我以15作为HEAD函数参数运行此查询时,在探查器中有以下跟踪:

Started reading data from the 'Sales 2010' partition.
Finished reading data from the 'Sales 2010' partition.
以及以下查询子多维数据集详细信息:

但是,如果将15更改为16或更多,则所有内容都会更改:

Started reading data from the 'Sales 2005' partition.
Started reading data from the 'Sales 2006' partition.
Started reading data from the 'Sales 2007' partition.
Started reading data from the 'Sales 2008' partition.
Started reading data from the 'Sales 2009' partition.
Started reading data from the 'Sales 2010' partition.
Finished reading data from the 'Sales 2007' partition.
Finished reading data from the 'Sales 2006' partition.
Started reading data from the 'Sales 2011' partition.
Finished reading data from the 'Sales 2005' partition.
Finished reading data from the 'Sales 2008' partition.
Finished reading data from the 'Sales 2009' partition.
Finished reading data from the 'Sales 2010' partition.
Finished reading data from the 'Sales 2011' partition.
现在DateId在verbose中有了所有标记:

Dimension 1 [Dates] (* * *)  [DateId]:*  [Years]:*  [Months]:*
我尝试使用:

分区上的直接切片:无更改 静态16+成员集:无更改 将聚合更改为总和:无更改 剪切聚合设置为1个成员:它工作正常,但谁需要这样的聚合。。。 选中的数据ID:所有数据都是顺序的,没有间隙,没有重叠 当聚合函数是SUM时,这不是什么大问题,但DISTINCT COUNT会使所有查询的运行时间延长3倍。当您单击EXCEL中的+按钮,并希望看到一个月内每天的MTD distinct count measure时,这是一个性能杀手

你知道如何停止过度扫描吗

Dimension 1 [Dates] (* * *)  [DateId]:*  [Years]:*  [Months]:*