Analysis Services Many-to-Many Dimensions: Query Performance Optimization Techniques
Many-to-many dimension relationships in SQL Server 2005 Analysis Services (SSAS) enable you to easily model complex source schemas and provide great analytical capabilities. This capability frequently comes with a substantial cost in query performance due to the runtime join required by Analysis Services to resolve many-to-many queries. This best practices white paper discusses three many-to-many query performance optimization techniques, including how to implement them, and the performance testing results for each technique. It demonstrates that optimizing many-to-many relationships by compressing the common relationships between the many-to-many dimension and the data measure group, and then defining aggregations on both the data measure group and the intermediate measure group yields the best query performance. The results show dramatic improvement in the performance of many-to-many queries as the reduction in size of the intermediate measure group increases. Test results indicate that the greater the amount of compression, the greater the performance benefits—and that these benefits persist as additional fact data is added to the main fact table (and into the data measure group).
Table of Contents
Introduction
Overview of Many-to-Many Relationships in SSAS
Aggregation Optimization Technique
Intermediate Measure Group Partitioning Optimization Technique
Matrix Relationship Optimization Technique
Compression and the Matrix Key
Implementing the Matrix Optimization
Relational Data Warehouse Implementation
Cube Design
ETL Implementation
Test Objective
Test Methodology
Scaling Up the AdventureWorksDW Relational Data Warehouse
Designing Multiple Cubes
Cube Designs
M2M Test Queries
Test Results and Observations
Scenario 1
Scenario 2
Scenario 3
Scenario 4
Conclusions
Appendix A: Aggregation Percentage
Appendix B: Calculating the Reduction %
Appendix C: Cube Details
Scenario 1
Scenario 2
Scenario 3
Scenario 4
Tags: performance, many-to-many, paper