NextAnalysisStep

Each time the clsPartitionAnalyzer NextAnalysisStep method is invoked, it adds another set of aggregations to the DesignedAggregations collection. It calculates the query performance gained and the storage requirements for the additional aggregations.

Syntax

bRet = dsoPartAnalyzer. NextAnalysisStep(dblPercentageBenefit, dblAccumulatedSize, lngAggregationsCount)

bRet
A Boolean variable that receives the returned value: True if the method completed successfully; False if otherwise.
dsoPartAnalyzer
The object of ClassType clsPartitionAnalyzer used to perform the analysis.
dblPercentageBenefit
The estimated percentage performance improvement that would be realized using the current collection of DesignedAggregations as opposed to querying against the underlying fact table. This is an output parameter.
dblAccumulatedSize
The estimated hard disk storage requirements (in bytes) for the current collection of DesignedAggregations. This is an output parameter.
lngAggregationsCount
The number of aggregations contained in the current collection of DesignedAggregations. This is an output parameter.
Remarks

NextAnalysisStep analyzes a partition's schema and generates a collection of aggregations that improve query performance. You can run the analysis without constraints. If no constraints are specified, the analysis will yield a generalized optimization. For more information, see AddGoalQuery and PrepareGoalQueries.

Example

Use the following code to run a series of analyses until either of the following two goals is reached:

For more information, see CloseAggregationAnalysis and InitializeDesign.

Place the following code in your form’s Declarations section:

'Assume the existence of an object (dsoPartAnalyzer) of ClassType
'clsPartitionAnalyzer

Private blnStopAdding          As Boolean

Private dblPercentageBenefit   As Double

Private dblAccumulatedSize     As Double

Private lngAggregationsCount   As Long

'Iterate thru analysis until either goal is reached

Do Until blnStopAdding 

    If Not dsoPartAnalyzer.NextAnalysisStep(dblPercentageBenefit, _

    dblAccumulatedSize, lngAggregationsCount) Then

        blnStopAdding = True 'No New Aggregations Designed

    Else

        blnStopAdding = (lngAggregationsCount >= 20) Or _

        (dblAccumulatedSize >= 100000)

    End If

Loop

 

(c) 1988-1998 Microsoft Corporation. All Rights Reserved.