Friday, March 20, 2015

SSAS (Multi Dimensional) Best Practices.

Dimension Design
  • Do not include attributes that are not needed. They slow down cube processing & also generate unnecessary aggregates which slow down cube performance.
  • Set AttributeHierarchyEnabled = False for attributes that will not be used in queries and will be used as member properties. e.g. SSN, Phone No, Address. Also set it to false for members that have high cardinality or 1-1 relationship with key attribute.
  • Set AttributeHierarchyVisible = False for attributes used in user defined hierarchy - avoids confusion to users.
  • Define appropriate attribute relationship. This enhances query as well as processing performance. 
  • Set attribute attribute RelationshipType = Rigid for attributes that will not change. The aggregates for these attributes will not be reprocessed when cube is updated.
  • Create appropriate user defined hierarchies. This will improve the usability of cube.


Measure Group/ Aggregate Design

  • Run the Aggregation Design Wizard to create the preliminary aggregation design. Specify correct counts for facts and dimension attributes. Target 20-30% performance gain.
  • When the cube has been deployed, you can turn on query logging and then use the Usage-Based Optimization Wizard. Target higher performance gain (70-80%), since the aggregates are based on usage.
  • Set AggregationUsage Property of Attributes as follows -
    • None for infrequently used attributes or for attributes not used in aggregate queries. This will prevent aggregates from being created for those attributes.
    • Unrestricted for attributes which will be used in queries. This will create aggregations for the attribute. By default key attributes and attributes used in natural hierarchy are unrestricted.
  • Do not include too many aggregations - query will be slower due to large search space, processing takes longer.
  • Partition the measure group. Queries & processing will be faster because multiple threads will be used.
  • Frequently used partitions can have higher aggregations.        
  • Older partitions that are fairly-static can be processed infrequently and newer partitions processed regularly (daily).
  • Use Smallest datatypes for measures .

No comments: