Presentation is loading. Please wait.

Presentation is loading. Please wait.

<Enter course name here>

Similar presentations


Presentation on theme: "<Enter course name here>"— Presentation transcript:

1 <Enter course name here>
Best Practices for Analysis Services Craig Utley Solid Quality Mentors CIOBriefings LLC © 2008

2 <Enter course name here>
Who Am I? Craig Utley, Mentor with Solid Quality Mentors Former SQL Server MVP and C# MVP Consultant specializing in development with Microsoft technologies and data warehousing Published author of books, whitepapers, articles, and courseware Operator of LearnMicrosoftBI.com CIOBriefings LLC © 2008

3 My Business Intelligence Experience
<Enter course name here> My Business Intelligence Experience Worked on first data warehousing course from Microsoft (1998) Working with BI in various forms for past 13 years Former member on Microsoft’s SQL Customer Advisory Team (SQLCAT), focused on BI Built warehouses or consulted on BI projects in financial, healthcare, manufacturing, and CPG industries Conference speaker and article author on BI topics CIOBriefings LLC © 2008

4 <Enter course name here>
Agenda There are a number of areas in which best practices can fall This talk will discuss best practices in the following areas: Design – General Design – Data Sources and DSVs Design – Dimensions Design – Measure Groups, Partitions, Aggregations Processing Server Settings Querying/MDX CIOBriefings LLC © 2008

5 <Enter course name here>
General Design Analysis Services 2005 and 2008 are extremely different from Analysis Services 2000 Upgrading Analysis Services 2000 might work well on small, simple cubes In almost all cases, expect to redesign the Analysis Services database to take advantage of new features For larger projects, plan to have a hardware expert available who understands SAN, load balancing, and so forth CIOBriefings LLC © 2008

6 <Enter course name here>
Design – Data Sources Data Sources should use Windows Authentication when connecting to SQL Server and then impersonate a domain account created for this purpose Account should have the least privileges possible to get to the data For SQL Server use the Microsoft OLE DB Provider for SQL Server or the SQL Server Native Client instead of the .NET Data Provider CIOBriefings LLC © 2008

7 Design – Data Source Views
<Enter course name here> Design – Data Source Views In the Data Source View, create a new diagram for each fact table This helps make each view look like its own star or snowflake schema For simple calculations and concatenations, create new columns in the relational DW or new named calculations the DSV CIOBriefings LLC © 2008

8 <Enter course name here>
Demo Data Sources and Data Source Views CIOBriefings LLC © 2008

9 <Enter course name here>
Design – Dimensions There are a number of design issues related to dimensions, including Attribute relationships Attribute key columns and name column Multilevel hierarchies and attribute hierarchies Other areas CIOBriefings LLC © 2008

10 Attribute Relationships
<Enter course name here> Attribute Relationships Attribute relationships tell the Analysis Services engine how attributes are related so that it can build aggregations and speed queries Ensure that attribute relationships are created and created correctly The visual designer in BIDS 2008 makes this much easier Set the RelationshipType to Rigid when possible CIOBriefings LLC © 2008

11 Attribute KeyColumns and NameColumn
<Enter course name here> Attribute KeyColumns and NameColumn Ensure that the KeyColumns is set to identify unique values For example, a month value of 1 is insufficient if the dimension contains more than a single year In this case, combine the Year and Month columns Set the NameColumn to a column that makes it clear what is being shown For example, instead of just a month value of 1, combine the month and year CIOBriefings LLC © 2008

12 <Enter course name here>
Demo Attribute Relationships CIOBriefings LLC © 2008

13 Other Dimension Design Issues
<Enter course name here> Other Dimension Design Issues Hide attribute hierarchies for attributes added to a multilevel hierarchy A dimension should contain no more than one non-aggregatable attribute Use numeric key columns Especially important for dimensions with more than 500,000 members Parent-child dimensions should not have more than 500,000 members in the key attribute Specify a dimension as type Time when possible CIOBriefings LLC © 2008

14 Design – Measure Groups
<Enter course name here> Design – Measure Groups Avoid having multiple measure groups with the same granularity and dimensionality Set IgnoreUnrelatedDimensions to False when possible to avoid repeating a value for all unrelated members Don’t create a many-to-many relationship if the dimensions or intermediate fact table have more than one million members Alternatives exist, check out Erik Veerman’s blog at CIOBriefings LLC © 2008

15 <Enter course name here>
Demo Measure Groups CIOBriefings LLC © 2008

16 <Enter course name here>
Design – Aggregations Rule of thumb is to create aggregations at 20% using Aggregation Design wizard Then log queries during periods of normal activity and use the Usage Based Optimization wizard (UBO) to define better aggregations Set approximate counts if there is too much data to let the wizard count the rows When creating custom aggregations, do not create aggregations below the measure group’s granularity Don’t create overlapping aggregations CIOBriefings LLC © 2008

17 <Enter course name here>
Demo Aggregations CIOBriefings LLC © 2008

18 <Enter course name here>
Design – Partitions Create partitions for larger data sets in order to speed up queries Partition by common usage, such as by time Partitioning by more than one criteria is acceptable, but ensure fact records do not appear in more than one partition Cubes should have no more than 2,000 partitions with a maximum of 20,000,000 records each in SSAS 2005 Partition the relational warehouse fact table the same way as the cube CIOBriefings LLC © 2008

19 <Enter course name here>
Processing Tweak the number of parallel tasks on the production server to see if a different value decreases processing time Use ProcessData and ProcessIndex instead of ProcessFull to get a more consistent processing pattern Use ASCMD to manipulate and process objects, especially on very large databases Use the <Parallel></Parallel> block to process objects in parallel CIOBriefings LLC © 2008

20 <Enter course name here>
Server Settings If running other apps or multiple instances of SSAS: Move Memory/LowMemoryLimit below 75% Move Memory/TotalMemoryLimit below 80% Modify CoordinatorExecutionMode to increase parallelism Negative numbers are the number of jobs per core Set Threadpool\Query\MaxThreads to no more than 2X the number of cores Set Threadpool\Process\MaxThreads to no more than 10X the number of cores Use recommendations from the Microsoft SQL Server 2005/2008 Analysis Services Performance Guide CIOBriefings LLC © 2008

21 <Enter course name here>
Demo Processing and Server Settings CIOBriefings LLC © 2008

22 <Enter course name here>
Querying Tips Learn how to monitor queries in action See Identifying and Resolving MDX Query Performance Bottlenecks in SQL Server 2005 Analysis Services Make sure to understand the Threadpool\Query settings See if data is coming from a cache, an aggregation, or a subcube query In high usage scenarios it can be useful to adjust MemoryHeapType Call PSS for support Learn how to scale up and scale out CIOBriefings LLC © 2008

23 <Enter course name here>
MDX Tips Set Non-empty behavior property on calculations where appropriate is SSAS 2005 Explicitly reference cells when possible Products.Printers instead of Dimensions(2).Printers Products.Printers instead of Products.CurrentMember Move simple calculations (such as Measure1 * Measure2) from Calculations to the DSV Understand what functions do cell by cell versus subspace computations Learn how to use the Scope statement CIOBriefings LLC © 2008

24 <Enter course name here>
Scope vs. Nested IIF CREATE MEMBER CURRENTCUBE.[MEASURES].[Foo] AS iif([Time].[Time Season].CurrentMember.Level IS [Time].[Time Season].[Day], null, iif([Time].[Time Season].CurrentMember.Level IS [Time].[Time Season].[Week], iif(isempty([Measures].[WTD Net Tot Sls]) or [MEasures].[WTD Net Tot Sls] = 0, null, [Measures].[TY Str Stk]/ [Measures].[WTD Net Tot Sls]), iif([Time].[Time Season].CurrentMember.Level is [Time].[Time Season].[Period], iif(isempty([Measures].[MTD Net Tot Sls]) or Measures].[MTD Net Tot Sls] = 0, null, [Measures].[TY Str Stk]/ [Measures].[MTD Net Tot Sls]), iif(isempty([Measures].[STD Net Tot Sls]) or [Measures].[STD Net Tot Sls] = 0, null, [Measures].[TY Str Stk]/[Measures].[STD Net Tot Sls] ) CIOBriefings LLC © 2008

25 Scope vs. Nested IIF Cont.
<Enter course name here> Scope vs. Nested IIF Cont. Create [Foo]; Scope [Foo]; [Time].[Time Season].[Week] = IIF( [Measures].[WTD Net Tot Sls] = 0, null, [Measures].[TY Str Stk] / [Measures].[WTD Net Tot Sls]); [Time].[Time Season].[Period] = IIF( [Measures].[MTD Net Tot Sls] = 0, null, [Measures].[TY Str Stk] / [Measures].[MTD Net Tot Sls]); [Time].[Time Season].[Season] = IIF( [Measures].[STD Net Tot Sls] = 0, null, [Measures].[TY Str Stk] / [Measures].[STD Net Tot Sls]); End Scope; CIOBriefings LLC © 2008

26 <Enter course name here>
Summary There are many best practices that must be applied during the design phase Dimensions Measure Groups Data sources, and so forth Processing can be tweaked through parallelism and memory adjustments Querying can be tuned through proper MDX, memory adjustments, and partitioning CIOBriefings LLC © 2008


Download ppt "<Enter course name here>"

Similar presentations


Ads by Google