SSAS多维数据集内存爆炸与MDX查询10维度

时间:2011-10-25 18:24:44

标签: ssas mdx olap dimensions cube

我们正在使用mdx查询查询SSAS多维数据集,该查询可以最多9个维度快速有效地执行。一旦我们达到10个维度,立方体的内存使用量就会大大失控,并使用机器上的所有可用内存,直到它基本上崩溃了机器。任何人都可以回答为什么10与9完全不同?

with member measures.CatKey
    as
    [Question Answer Primary].[Q-A].currentmember.properties('key')
select {
        measures.CatKey,
        [Measures].[AverageValue],
        KPIValue('KPI Question Average Delta Wave Over Wave'),
        KPITrend('KPI Question Average Delta Wave Over Wave'),
        [Measures].[TopBoxPercent],
        KPIValue('KPI Top Box Delta Wave Over Wave'),
        KPITrend('KPI Top Box Delta Wave Over Wave'),
        [Measures].[MiddleBoxPercent],
        KPIValue('KPI Middle Box Delta Wave Over Wave'),
        KPITrend('KPI Middle Box Delta Wave Over Wave'),
        [Measures].[BottomBoxPercent],
        KPIValue('KPI Bottom Box Delta Wave Over Wave'),
        KPITrend('KPI Bottom Box Delta Wave Over Wave'),
        [Measures].[Primary Response Count]
    } on columns,

    [Question Answer Primary].[Q-A].[QUESTIONCATEGORY] * [Question Answer Primary].[QUESTIONKEY].[QUESTIONKEY]
    DIMENSION PROPERTIES MEMBER_VALUE on rows

from [SATPlus_Cube]

where CrossJoin({[Response Wave].[Wave].&[20110101]}, 
{
    [Question Answer Primary].[QUESTIONCATEGORY].&[AfricaSpecific], 
    [Question Answer Primary].[QUESTIONCATEGORY].&[ChinaSpecific], 
    [Question Answer Primary].[QUESTIONCATEGORY].&[Training], 
    [Question Answer Primary].[QUESTIONCATEGORY].&[SalesSupport], 
    [Question Answer Primary].[QUESTIONCATEGORY].&[Relationship], 
    [Question Answer Primary].[QUESTIONCATEGORY].&[ProductsAndPartsQuality], 
    [Question Answer Primary].[QUESTIONCATEGORY].&[ProductSupport], 
    [Question Answer Primary].[QUESTIONCATEGORY].&[PricingAndDiscounts],
    [Question Answer Primary].[QUESTIONCATEGORY].&[Overall],
    [Question Answer Primary].[QUESTIONCATEGORY].&[KeyMetrics],
    [Question Answer Primary].[QUESTIONCATEGORY].&[ITSystemsSupport],
    [Question Answer Primary].[QUESTIONCATEGORY].&[GovernmentNationalSales],
    [Question Answer Primary].[QUESTIONCATEGORY].&[FinancingAndCredit],
    [Question Answer Primary].[QUESTIONCATEGORY].&[FieldSupport], 
    [Question Answer Primary].[QUESTIONCATEGORY].&[DistributionSupport], 
    [Question Answer Primary].[QUESTIONCATEGORY].&[AdvertisingSupport]
}, 
NonEmpty (
        {[Sample].[SAMPLE KEY].[SAMPLE KEY]},
        ( 
            {[Hierarchy].[Node Value].&[1]}
            , [Measures].[Primary Response Count]
        )
    ))

2 个答案:

答案 0 :(得分:0)

您是否尝试过子框架语法?也许可能会更好......

    Select 
    {...} On Columns,
    {...} On Rows
    from (Select {{[Response Wave].[Wave].&[20110101]}} On Columns
          From {
        [Question Answer Primary].[QUESTIONCATEGORY].&[AfricaSpecific], 
        [Question Answer Primary].[QUESTIONCATEGORY].&[ChinaSpecific], 
        ...
        [Question Answer Primary].[QUESTIONCATEGORY].&[DistributionSupport], 
        [Question Answer Primary].[QUESTIONCATEGORY].&[AdvertisingSupport]
    } On Columns FROM [SATPlus_Cube]))
    WHERE .....

答案 1 :(得分:0)

也许你的维度中有太多成员(#10)。