Friday, February 24, 2012

AMO. AggregationDesign.EstimatedPerformanceGain

Hi, why this field is always empty?

I this a "free" field, that can be set from ISV developer as he want?

But it is not persistent. (Is this a bug?)

What a purpose of the field?

After designing aggregations (with the wizard or with AMO), engine will provide a value for the EstimatedPerformanceGain property. This property is read-only from the client (AMO) point of view.

Adrian Dumitrascu

|||

This is not right.

After designing aggregations this field is definitly not set in AMO.

public static void DesignAggregation(MeasureGroup pMg, long pOtimizations, long pAggCount, out long oOptimisations, out long oAggCount) {

double lOptimizations = 0;

double lStorage = 0;

long lAggCount = 0;

bool lHasFinished = false;

AggregationDesign lAd;

lAd = pMg.AggregationDesigns.Add(cDefaultAggrDesign);

lAd.InitializeDesign();

lOptimizations = 0;

while (lOptimizations < pOtimizations && lAggCount < pAggCount && !lHasFinished) {

lAd.DesignAggregations(out lOptimizations, out lStorage, out lAggCount, out lHasFinished);

pDelegate(pMg.Name, ((int)lOptimizations).ToString(), lAggCount.ToString());

}

oOptimisations = (int)lOptimizations;

oAggCount = lAggCount;

lAd.FinalizeDesign();

// The lAd.EstimatedPerformanceGain is always 0.

// If I set it here. It will be not saved on server.

lAd.EstimatedPerformanceGain = (int)lOptimizations;

lAd.Update();

lAd.Refresh();

// Here lAd.EstimatedPerformanceGain is again 0.

pMg.Update();

}

No comments:

Post a Comment