Performance Tuning Cubes and Queries in Analysis Services 2008 Chris Webb

Slides:



Advertisements
Similar presentations
Common Analysis Services Design Mistakes and How to Avoid Them
Advertisements

Ashwani Roy Senior Consultant –Information Management Group Supercharge MDX Using MDX Studio Level 300.
Adam Jorgensen Pragmatic Works Performance Optimization in SQL Server Analysis Services 2008.
© Bharati Vidyapeeths Institute of Computer Applications and Management, New Delhi © Bharati Vidyapeeths Institute of Computer Applications and.
Chris Webb Crossjoin Consulting Ltd
Cache –Warming Strategies for Analysis Services 2008 Chris Webb Crossjoin Consulting Limited
Introduction to ETL Using Microsoft Tools By Dr. Gabriel.
SQL SERVER 2012 XVELOCITY COLUMNSTORE INDEX Conor Cunningham Principal Architect SQL Server Engine.
SQL Server Accelerator for Business Intelligence (SSABI)
OCS Infotech Proprietary & Confidential Typical BI solution Architecture.
OLAP Services Business Intelligence Solutions. Agenda Definition of OLAP Types of OLAP Definition of Cube Definition of DMR Differences between Cube and.
Implementing Business Analytics with MDX Chris Webb London September 29th.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 11 Database Performance Tuning and Query Optimization.
Platinum Gold Silver Group BY: [Remember get your Tickets for Entry, Coach, Drink] Feedback Forms: [Fill these out at the end of each session.
An Array-Based Algorithm for Simultaneous Multidimensional Aggregates
Markus Raatz General Manager ixto GmbH Session Code: DAT302.
Performance Investigations with Analysis Services 2012
SQL Analysis Services Microsoft® SQL Server 2005 Analysis Services provides unified, fully integrated views of your business data to support online.
SharePoint 2010 Business Intelligence Module 6: Analysis Services.
SQL Server Integration Services (SSIS) Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server (MVP) Microsoft Certified Technology Specialist.
IST722 Data Warehousing Business Intelligence Development with SQL Server Analysis Services and Excel 2013 Michael A. Fudge, Jr.
Analysis Services 101 Dave Fackler, MCDBA, MCSE, MCT Director, Business Intelligence Practice Intellinet Corporation.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 11 Database Performance Tuning and Query Optimization.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
Common Analysis Services Multidimensional Design Mistakes and How to Avoid Them Chris Webb
Chris Testa-O’Neill QA. Who am I Chris Testa-O’Neill Business Intelligence Specialist at QA Technical Author for Microsoft E-Learning Author of the SQL.
MSBI online training. MSBI Online Training Course Content : What Is Microsoft BI? Core concept – BI is the cube or UDM Example cube as seen using Excel.
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
The Great OLAP Debate! TM1, PowerPlay & DMRs April 29, 2011.
Fun with Scoped Assignments
10 Things All BI Administrators Should Know Robert L Davis.
BW Know-How Call : Performance Tuning dial-in phone numbers! U.S. Toll-free: (877) International: (612) Passcode: “BW”
BI Terminologies.
Views Lesson 7.
Platinum Gold Silver Group BY: [Remember get your Tickets for Entry, Coach, Drink] Feedback Forms: [Fill these out at the end of each session.
Designing Aggregations. Performance Fundamentals - Aggregations Pre-calculated summaries of data Intersections of levels from each dimension Tradeoff.
Amit Bansal CTO | Peopleware India (unit of eDominer Systems) | |
Advanced Tips And Tricks For Power Query
BI Practice March-2006 COGNOS 8BI TOOLS COGNOS 8 Framework Manager TATA CONSULTANCY SERVICES SEEPZ, Mumbai.
Centre of Competence on data warehouse Workshop Helsinki Database Cube and Browsing the Cube Mark Rantala.
SQL Server Analysis Services 2012 BI Semantic Model BISM.
What is OLAP?.
for all Hyperion video tutorial/Training/Certification/Material Essbase Optimization Techniques by Amit.
Oracle Business Intelligence Foundation - Commonly Used Features in Repository.
5 Copyright © 2008, Oracle. All rights reserved. Testing and Validating a Repository.
Database Systems, 8 th Edition SQL Performance Tuning Evaluated from client perspective –Most current relational DBMSs perform automatic query optimization.
BISM Introduction Marco Russo
Advanced MDX Tips And Tricks Chris Webb. Who Am I? Chris Webb UK-based consultant and trainer:
Physical Layer of a Repository. March 6, 2009 Agenda – What is a Repository? –What is meant by Physical Layer? –Data Source, Connection Pool, Tables and.
Advanced Analysis Services Security Chris Webb Crossjoin Consulting Limited.
During Recording 1. Click Record to launch the slideshow. 2. Check the microphone input level. When ready, select the Click to begin recording button or.
11 Copyright © 2009, Oracle. All rights reserved. Enhancing ETL Performance.
SQL IMPLEMENTATION & ADMINISTRATION Indexing & Views.
<Enter course name here>
SQL Database Management
Building a Polished Cube
Power BI Performance Tips & Tricks
6/12/2018 2:19 PM BRK3245 DirectQuery in Analysis Services: best practices, performance, and use cases Marco Russo SQLBI © Microsoft Corporation. All rights.
6/19/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
ROLAP partitioning in MS SQL Server 2016
Software Architecture in Practice
Database Performance Tuning and Query Optimization
Introduction to tabular models
Introduction to tabular models
Implementing Data Models & Reports with Microsoft SQL Server
TechEd /24/2018 6:19 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
Module 7: Working with Measures and Measure Groups
DataMart (Data Warehouse) Tool:
Four Rules For Columnstore Query Performance
Chapter 11 Database Performance Tuning and Query Optimization
Presentation transcript:

Performance Tuning Cubes and Queries in Analysis Services 2008 Chris Webb

Who am I? Chris Webb Independent consultant specialising in Analysis Services and MDX: Blogger: Author: – MDX Solutions 2 nd Edition – Expert Cube Development With Analysis Services 2008

Agenda Designing for Performance How Analysis Services Answers Queries Partitions Aggregations Formula Engine bottlenecks Caching

Designing for Performance Some features give increased flexibility at a cost to performance – Eg parent/child hierarchies, referenced relationships, unnatural hierarchies, many-to-many, distinct count, semi-additive measures... Mistakes made in modelling the data warehouse are often ‘papered over’ using SSAS features – Eg calculations being done in MDX when they should have been done in the ETL Design decisions should always be made with query performance in mind

Attribute Relationships Attribute relationships describe the one-to- many relationships between attributes in your dimensions Will probably not be optimal after you’ve run the Dimension wizard – only knows about foreign key relationships Are very important for query performance

Parent/Child Hierarchies Parent/child hierarchies are very flexible, but can perform badly sometimes – Especially where the hierarchy contains thousands of members If you know the maximum depth of the hierarchy, use a ragged hierarchy instead – Although ragged hierarchies can also perform badly The ‘parent/child hierarchy naturaliser’ in BIDS Helper can do this automatically

SSAS Query Processing Formula Engine works out what data is needed for each query, and requests it from the Storage Engine handles retrieval of raw data from disk, and any aggregation required MDX Query In Cellset Out Query Subcube Requests Cache Disk

Tuning the Storage Engine Tuning the Storage Engine is all about: – Reducing the time taken to read data from disk – Reducing the time taken to aggregate that data to the required granularity As a result, disk and CPU have an important role to play in Storage Engine performance However, throwing hardware at the problem is rarely the whole answer

Partitions Measure groups can be divided up into multiple partitions – Enterprise Edition only You should partition your measure groups to reflect the slices that users are likely to use in their queries – Usually by the Time dimension Partitioning improves query performance in two ways: – It reduces overall IO because AS should only scan the partitions containing the data requested – It increases parallelism because AS can scan more than one partition simultaneously

Partitions You should be partitioning so that a single partition contains between 2 million rows and 30 million rows of data Although SSAS should auto-detect the slice of a partition, it is good practice to set the Slice property manually, even on MOLAP partitions In Profiler, Progress Report Begin/End events show which partitions are being read

Aggregations Aggregations are pre-calculated sets of summary values – Similar to what is returned by a GROUP BY query in SQL Building aggregations improves query performance by reducing the amount of calculation done at query time Aggregations start to show an effect on regular Sum measures where partition size is greater than a few million rows A Measure Group can have multiple Aggregation Designs A Partition can be associated with one Aggregation Design – aggregations are built on a per-partition basis

Aggregation Design Methodology 1.Make your dimension design as ‘clean’ as possible – delete or disable unnecessary attributes, set attribute relationships 2.Set the AggregationUsage property appropriately on each Cube dimension 3.Run the Aggregation Design Wizard 1.First using the ‘I Click Stop’ option 2.Then, if this creates too many aggregations, using ‘Performance Gain’ of 30%

Aggregation Design Methodology 4.Set up Query Logging and run Usage-Based Optimisation 5.If necessary, design aggregations manually using BIDS Helper or the Aggregation Design tab 6.Check aggregations are being used by looking for the Get Data From Aggregation event in Profiler

The Formula Engine If Storage Engine requests make up a negligible percentage of the time taken by the query, then the Formula Engine is the problem – Profiler and MDX Studio can be used to find out if this is the case – MDX Script Performance Analyser can help to work out which, if any, calculation on the cube is the problem Another giveaway sign is that when a query runs on a multi-processor server, only one CPU shows activity – The Formula Engine is single-threaded Rewriting MDX calculations can result in massive gains in performance

Writing Efficient MDX As with all code, using efficient algorithms is very important – It’s important to avoid doing expensive operations more than is necessary – Named sets can store the result of expensive set operations – Calculated members can cache the result of expensive numeric calculations In the implementation of these algorithms, it’s important to know which MDX functions perform best – MDX Studio can tell you which functions to avoid – Will vary by version and SP Calculations that execute in ‘bulk mode’ can perform many times better than those that execute in ‘cell-by-cell’ mode

Caching Caching can take place in the Storage Engine and the Formula Engine Caching is extremely important to query performance SE caching is very reliable, and caches can be shared between all users FE caching is much more temperamental...

Formula Engine Caching There are three different ‘scopes’ or lifetimes of a FE cache: – Query – for calculations defined in the WITH clause of a query, the FE values can only be cached for the lifetime of the query – Session – for calculations defined for a session, using the CREATE MEMBER statement executed on the client, FE values can only be cached for the lifetime of a session – Global – for calculations defined in the cube’s MDX Script, FE values can be cached usually until processing takes place Global scope is best from a performance point of view!

Restrictions on FE Caching Any calculations defined in the WITH clause of a query will force query scope for the FE cache As will the use of cell security As will the use of non-deterministic functions like NOW() With dimension security, calculation caches can only be shared between users who have the same permissions

Exploiting FE Caching Caching numeric values, so that expensive calculations are only performed once, can be very important for calculation performance Use of certain MDX functions and constructs can force Query scope for FE caching, and hurt performance

Cache Warming Data can be loaded into the SE cache by executing CREATE CACHE statements The FE cache can only be warmed by running MDX queries Cache warming involves automatically loading data into the cache to improve query performance for real users – SSIS packages can be used to do this

Thanks!

Links performance-tuning-microsoft-analysis- services-part1 performance-tuning-microsoft-analysis- services-part2 performance-tuning-microsoft-analysis- services-part1 performance-tuning-microsoft-analysis- services-part2