Hi Gayatri,
There are possible performance improvements to the MDX script, based on
suggestions 1, 6 and 7 in this paper:
http://www.sqlserveranalysisservices...Performance%20
Hintsv1.htm
...
Don’t Filter on Member Property Values
In SQL Server Analysis Services 2000, the filter function was a common
means of selecting members from a set whose member property satisfied
some condition; for example male customers could be expressed as :
Filter(Customer.name.Name.members,
Customer.name.currentmember.properties(“Gender”) = “Male”)
Don’t do this in SQL Server Analysis Services 2005. Instead, create an
attribute hierarchy Customers.Gender.Male
...
Use Scoped Assignments instead of Nested IIFs
Expressions can depend on their position in a hierarchy. For example, if
an expression relied on the value of a member property defined on a
members of a level, the expression is only good if the current member
from that hierarchy is from that level.
In SQL Server Analysis Services 2005, create multiple scoped assignments
instead of creating a single calculation with multiple IIFs with
different calculations depending on level ordinal.
...
Conditions in Assignments
If you can avoid it, don’t use conditions in assignments. Instead, scope
only on the space where the calculation should be applied. (The scope
statement is new in SQL Server Analysis Services 2005).
...
So something like this might improve performance:
Quote:
|
Scope([DimConfig].[ConfigHierarchy].[Metric].Members);
|
Scope([DimConfig].[ConfigHierarchy].[RollUpAggregationType].[SUM]);
this = Sum([DimConfig].[ConfigHierarchy].Children);
End Scope;
Scope([DimConfig].[ConfigHierarchy].[RollUpAggregationType].[AVERAGE]);
this = Avg([DimConfig].[ConfigHierarchy].Children);
End Scope;
Scope([DimConfig].[ConfigHierarchy].[RollUpAggregationType].[MIN]);
this = Min([DimConfig].[ConfigHierarchy].Children);
End Scope;
Scope([DimConfig].[ConfigHierarchy].[RollUpAggregationType].[MAX]);
this = Max([DimConfig].[ConfigHierarchy].Children);
End Scope;
End Scope;
- Deepak
Deepak Puri
Microsoft MVP - SQL Server
*** Sent via Developersdex http://www.developersdex.com ***