Platinum Gold Silver www.sqlbits.com Group BY: [Remember get your Tickets for Entry, Coach, Drink] Feedback Forms: [Fill these out at the end of each session.

Slides:



Advertisements
Similar presentations
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Advertisements

Adam Jorgensen Pragmatic Works Performance Optimization in SQL Server Analysis Services 2008.
Cache –Warming Strategies for Analysis Services 2008 Chris Webb Crossjoin Consulting Limited
An Array-Based Algorithm for Simultaneous Multidimensional Aggregates By Yihong Zhao, Prasad M. Desphande and Jeffrey F. Naughton Presented by Kia Hall.
Customizing Reports. Custom Reports A report is a formatted hardcopy of the contents of one or more tables from a database. Although you can format and.
Dos and don’ts of Columnstore indexes The basis of xVelocity in-memory technology What’s it all about The compression methods (RLE / Dictionary encoding)
Platinum Gold Silver Group BY: [Food and Drink at Reading Bowl, see you there!] Feedback Forms: [Voucher for £30 book on return of Form]
Implementing Business Analytics with MDX Chris Webb London September 29th.
Platinum Gold Silver Group BY: [Food and Drink at Reading Bowl, see you there!] Feedback Forms: [Voucher for £30 book on return of Form]
Runtime alignment system SOFTWARE DESIGN IDEAS Wed 4 th May 2005 P Coe.
©Company confidential 1 Performance Testing for TM & D – An Overview.
An Array-Based Algorithm for Simultaneous Multidimensional Aggregates
Performance Investigations with Analysis Services 2012
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 27 Slide 1 Quality Management 1.
SharePoint 2010 Business Intelligence Module 6: Analysis Services.
IST722 Data Warehousing Business Intelligence Development with SQL Server Analysis Services and Excel 2013 Michael A. Fudge, Jr.
Performance Tuning Cubes and Queries in Analysis Services 2008 Chris Webb
Planning and Tracking Projects with VSTS 2010 By Ahmed Nasr 1.
Common Analysis Services Multidimensional Design Mistakes and How to Avoid Them Chris Webb
Fun with Scoped Assignments
Optimizing Time-Series Calculations in SSAS
10 Things All BI Administrators Should Know Robert L Davis.
Examining data using Microsoft Access Queries Using Criteria and Calculations SESSION 3.2 This section covers specifying an exact match condition in a.
Moving Around in Scratch The Basics… -You do want to have Scratch open as you will be creating a program. -Follow the instructions and if you have questions.
SEMANTEC 1 Oracle Performance Tuning - Part I Krasen Paskalev Oracle 8i Certified DBA.
© 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Perfmon and Profiler 101.
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.
Amit Bansal CTO | Peopleware India (unit of eDominer Systems) | |
Downloading and Installing Autodesk Inventor Professional 2015 This is a 4 step process 1.Register with the Autodesk Student Community 2.Downloading the.
Advanced Tips And Tricks For Power Query
Matthew Glenn AP2 Techno for Tanzania This presentation will cover the different utilities on a computer.
Accelerating PHP Applications Ilia Alshanetsky O’Reilly Open Source Convention August 3rd, 2005.
1 Chapter 9 Tuning Table Access. 2 Overview Improve performance of access to single table Explain access methods – Full Table Scan – Index – Partition-level.
Platinum Gold Silver Group BY: [Food and Drink at Reading Bowl, see you there!] Feedback Forms: [Voucher for £30 book on return of Form]
for all Hyperion video tutorial/Training/Certification/Material Essbase Optimization Techniques by Amit.
Oracle Business Intelligence Foundation - Commonly Used Features in Repository.
Advanced MDX Tips And Tricks Chris Webb. Who Am I? Chris Webb UK-based consultant and trainer:
A highway through the mountains of data with the SQL Server Tabular Model This presentation is a walk through in-memory database and reporting features.
OM. Platinum Level Sponsors Gold Level Sponsors Pre Conference Sponsor Venue Sponsor Key Note Sponsor.
IB Diploma Examinations May 2015 Final advice and explanation of conditions.
Advanced Analysis Services Security Chris Webb Crossjoin Consulting Limited.
CSE 351 Caches. Before we start… A lot of people confused lea and mov on the midterm Totally understandable, but it’s important to make the distinction.
Honest Bob’s Cube Processing Bob Duffy Database Architect.
No more waiting. Sponsors About me  Database Technology Specialist  MVP  Blogger  Author 3
Hitting the SQL Server “Go Faster” Button Rob Douglas #509 | Brisbane 2016.
SQL IMPLEMENTATION & ADMINISTRATION Indexing & Views.
Performance Monitoring for SQL Server Analysis Services Stan Geiger #506 | Baltimore BI 2016.
Review DirectQuery in SSAS 2016, best practices and use cases
<Enter course name here>
Power BI Performance Tips & Tricks
Hitting the SQL Server “Go Faster” Button
6/12/2018 2:19 PM BRK3245 DirectQuery in Analysis Services: best practices, performance, and use cases Marco Russo SQLBI © Microsoft Corporation. All rights.
Informatica PowerCenter Performance Tuning Tips
SQL Server Integration Services
Introduction to Computers
ROLAP partitioning in MS SQL Server 2016
Software Architecture in Practice
Database Performance Tuning and Query Optimization
Test Upgrade Name Title Company 9/18/2018 Microsoft SharePoint
Power BI Performance …Tips and Techniques.
Hitting the SQL Server “Go Faster” Button
JULIE McLAIN-HARPER LINKEDIN: JM HARPER
Welcome to SQL Saturday Denmark
Steve Hood SimpleSQLServer.com
Transactions.
Four Rules For Columnstore Query Performance
Chapter 11 Database Performance Tuning and Query Optimization
Presentation transcript:

Platinum Gold Silver Group BY: [Remember get your Tickets for Entry, Coach, Drink] Feedback Forms: [Fill these out at the end of each session please] Lunch Time Sessions: [Once you eat, learn some more; Grok Talks in Chicago 1 and 2 Quest are in Menphis, Idera are in Everest] Learn & Enjoy [Put your phone on Vibrate!] Ask The Experts [Sessions need to finish on time, take questions to the ATE area]

Performance Tuning MDX Queries Chris Webb Crossjoin Consulting Limited / Solid Quality Mentors

Agenda Performance tuning methodology Tuning the cube Tuning MDX in queries and calculations Cheating: warming the cache

Performance Tuning Methodology Before you start your work, ensure that: – Your test environment is comparable with your production environment – Nothing else is happening on the server – No-one will connect to the server and try to run queries – You know what exactly you are trying to tune!

Performance Tuning Methodology Capture sample queries using Profiler Look at the Query End events for the MDX used Look at the Duration for how long the query took to run in ms Note that for some clients (eg Excel before 2007) queries may be dependent on named sets declared earlier in the session

Performance Tuning Methodology Clear the cache using an XMLA ClearCache command before running your query for the first time Then run the query again immediately afterwards, so you have timings on a cold and warm cache Disk caching may also have a noticeable impact if you are querying a newly-processed cube

Hardware Throwing hardware at the problem is rarely the answer, unless: – You have problems with performance degredation with large numbers of concurrent users – You have a lot of data Extra memory will mean you have more room for caching query results Disk IO should be as fast as you can afford Extra CPUs can help when you have queries that cross multiple partitions, or many concurrent users

Attribute Relationships Make sure attribute relationships in your dimension are set up to reflect all 1:M relationships in your data Failure to do so will mean that you will not get maximum benefit from aggregations and partitioning, and the engine itself will be less efficient

Query Execution

Tuning the Storage Engine The percentage of time spent in the Storage Engine can be worked out by: – Summing the Duration of all Query Subcube events seen in Profiler – Dividing that by the Duration of the Query End event If you see a Query Subcube event take more than 0.5 seconds it should probably be tuned

Partitioning You should partition your measure groups to reflect the slices that users are likely to use in their queries 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

Partitioning You should be partitioning so that a single partition contains between 2 million rows and 15 million rows of data Although AS 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 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 Can have an effect on much smaller partitions where there are complex calculations

Aggregation Design Methodology 1.Make your dimension design as ‘clean’ as possible – delete or disable unnecessary attributes 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.Don’t bother with Usage-Based Optimisation: it may overwrite existing useful aggregations 5.If necessary, design aggregations manually using the version of Aggregation Manager built-in to BIDS Helper 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 Another giveaway sign is that when a query runs on a multi-processor server, only one CPU shows activity – The Formula Engine only uses one thread per query MDX Script Performance Analyser can help to work out which, if any, calculation is the problem

Using Named Sets Use named sets instead of repeatedly evaluating the same set expression Named sets can be defined – On the cube and in the session, but since they are static (until AS2008) they are of limited usefulness – In the WITH clause, which is useful only if you have control over the MDX you’re executing – Inline, which can be very powerful but also a bit buggy

Non Empty Filtering Removing empty values before a set operation, such as a Sum(), is often important This relies on the fact that in many cases, AS can remove empty values very quickly Do not use NonEmptyCrossjoin() any more, use the NonEmpty() function instead: it is more reliable, predictable, and just as fast

Non_Empty_Behavior Setting the Non_Empty_Behavior property on calculated members can provide a massive performance increase However, knowing how to set it correctly can be very difficult: “I feel that it is the best not to mention NON_EMPTY_BEHAVIOR at all - unless you can explain what it does - and (no offence) I don't think you will be able to do it.”, Mosha

Non_Empty_Behavior Non_Empty_Behavior has improves query performance in two ways: – When filtering out empty tuples from a set using NON EMPTY or NonEmpty() – When working out how to request the data a calculation needs from the Storage Engine, even when there is no filtering taking place Increasingly, the Formula Engine can ‘guess’ what it should be set to though

Non_Empty_Behavior In general, the rule for setting it is if you can say: = iif(IsEmpty( ), null, ); Then you can say: Non_Empty_Behavior( )= ;

Appropriate Calculation Scope Use scoped assignments to determine when and where calculations execute, rather than conditional logic – For example, a year-to-date calculation will never be relevant at the year level – Do not use IIF with Hierarchy.Currentmember.Level – scope on the level itself

Aggregation-Aware Calculations If you know where you have built your aggregations, it can make sense to write your calculations appropriately For example, if you have an aggregation at the year level, the calculation: Q1 + Q2 + Q3 might be better expressed as: Year – Q4

MDX to Avoid ORDER – there’s a bug which makes it perform badly! Use TOPCOUNT instead. LOOKUPCUBE – redesign your cube instead CASE – it isn’t optimised, use IIF instead Non-deterministic functions like USERNAME, STRTOX – they stop AS being able to cache calculated values Late-binding functions like LINKMEMBER – they stop AS being able to generate efficient query plans

Warming the Cache Analysis Services can cache Storage Engine data in most circumstances It can also cache calculation results in many cases too As a result, most queries execute much faster (if not immediately) on a warm cache So why not run a sample of common queries every night after cube processing?

How to Warm the Cache The Create Cache MDX statement (available in AS2K and AS2005 post SP2) is useful for loading the Storage Engine cache Several tools can be used to automate running of queries: – Ascmd, available in the SQL Server samples – SSIS, using the Execute SQL task

Resources “Analysis Services 2005 Performance Guide” white paper “Identifying and Resolving MDX Query Performance Bottlenecks” white paper Mosha’s blog: My blog:

Questions?

Platinum Gold Silver [Conference Web site] [Becoming the premier Blogging site for SQL professionals] [UK SQL Server Community Website] UK SQL Bloggers cwebbbi.spaces.live.com sqlblogcasts.com/blogs/simons sqlblogcasts.com/blogs/tonyrogerson Remember :: Feedback Forms!!