Microsoft SQL Server Analysis Services Multidimensional Performance and Operations Guide Thomas Kejser and Denny Lee
Total Page:16
File Type:pdf, Size:1020Kb
Microsoft SQL Server Analysis Services Multidimensional Performance and Operations Guide Thomas Kejser and Denny Lee Contributors and Technical Reviewers: Peter Adshead (UBS), T.K. Anand, KaganArca, Andrew Calvett (UBS), Brad Daniels, John Desch, Marius Dumitru, WillfriedFärber (Trivadis), Alberto Ferrari (SQLBI), Marcel Franke (pmOne), Greg Galloway (Artis Consulting), Darren Gosbell (James & Monroe), DaeSeong Han, Siva Harinath, Thomas Ivarsson (Sigma AB), Alejandro Leguizamo (SolidQ), Alexei Khalyako, Edward Melomed, AkshaiMirchandani, Sanjay Nayyar (IM Group), TomislavPiasevoli, Carl Rabeler (SolidQ), Marco Russo (SQLBI), Ashvini Sharma, Didier Simon, John Sirmon, Richard Tkachuk, Andrea Uggetti, Elizabeth Vitt, Mike Vovchik, Christopher Webb (Crossjoin Consulting), SedatYogurtcuoglu, Anne Zorner Summary: Download this book to learn about Analysis Services Multidimensional performance tuning from an operational and development perspective. This book consolidates the previously published SQL Server 2008 R2 Analysis Services Operations Guide and SQL Server 2008 R2 Analysis Services Performance Guide into a single publication that you can view on portable devices. Category: Guide Applies to: SQL Server 2005, SQL Server 2008, SQL Server 2008 R2, SQL Server 2012 Source: White paper (link to source content, link to source content) E-book publication date: May 2012 200 pages This page intentionally left blank Copyright © 2012 by Microsoft Corporation All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Microsoft and the trademarks listed at http://www.microsoft.com/about/legal/en/us/IntellectualProperty/Trademarks/EN-US.aspx are trademarks of the Microsoft group of companies. All other marks are property of their respective owners. The example companies, organizations, products, domain names, email addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name, email address, logo, person, place, or event is intended or should be inferred. This book expresses the author’s views and opinions. The information contained in this book is provided without any express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers, or distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly by this book. Contents 1 Introduction .......................................................................................................................................... 5 2 Part 1: Building a High‐Performance Cube ........................................................................................... 6 2.1 Design Patterns for Scalable Cubes ........................................................................................... 6 2.2 Testing Analysis Services Cubes .............................................................................................. 32 2.3 Tuning Query Performance ..................................................................................................... 39 2.4 Tuning Processing Performance .............................................................................................. 76 2.5 Special Considerations ............................................................................................................ 93 3 Part 2: Running a Cube in Production ............................................................................................... 105 3.1 Configuring the Server ........................................................................................................... 106 3.2 Monitoring and Tuning the Server ........................................................................................ 133 3.3 Security and Auditing ............................................................................................................ 143 3.4 High Availability and Disaster Recovery ................................................................................ 147 3.5 Diagnosing and Optimizing .................................................................................................... 150 3.6 Server Maintenance .............................................................................................................. 189 3.7 Special Considerations .......................................................................................................... 192 4 Conclusion ......................................................................................................................................... 200 Send feedback. .......................................................................................................................................... 200 4 1 Introduction This book consolidates two previously published guides into one essential resource for Analysis Services developers and operations personnel. Although the titles of the original publications indicate SQL Server 2008 R2, most of the knowledge that you gain from this book is easily transferred to other versions of Analysis Services, including multidimensional models built using SQL Server 2012. Part 1 is from the “SQL Server 2008 R2 Analysis Services Performance Guide”. Published in October 2011, this guide was created for developers and cube designers who want to build high‐performance cubes using best practices and insights learned from real‐world development projects. In Part 1, you’ll learn proven techniques for building solutions that are faster to process and query, minimizing the need for further tuning down the road. Part 2 is from the “SQL Server 2008 R2 Analysis Services Operations Guide“. This guide, published in June 2011, is intended for developers and operations specialists who manage solutions that are already in production. Part 2 shows you how to extract performance gains from a production cube, including changing server and system properties, and performing system maintenance that help you avoid problems before they start. While each guide targets a different part of a solution lifecycle, having both in a single portable format gives you an intellectual toolkit that you can access on mobile devices wherever you may be. We hope you find this book helpful and easy to use, but it is only one of several formats available for this content. You can also get printable versions of both guides by downloading them from the Microsoft web site. 5 2 Part 1: Building a High-Performance Cube This section provides information about building and tuning Analysis Services cubes for the best possible performance. It is primarily aimed at business intelligence (BI) developers who are building a new cube from scratch or optimizing an existing cube for better performance. The goal of this section is to provide you with the necessary background to understand design tradeoffs and with techniques and design patterns that will help you achieve the best possible performance of even large cubes. Cube performance can be divided into two types of workload: query performance and processing performance. Because these workloads are very different, this sectionis organized into four main groups. Design Patterns for Scalable Cubes – No amount of query tuning and optimization can beat the benefits of a well‐designed data model. This section contains guidance to help you get the design right the first time. In general, good cube design follows Kimball modeling techniques, and if you avoid some typical design mistakes, you are in very good shape. Testing Analysis Services Cubes – In every IT project, preproduction testing is a crucial part of the development and deployment cycle. Even with the most careful design, testing will still be able to shake out errors and avoid production issues. Designing and running a test run of an enterprise cube is time well invested. Hence, this section includes a description of the test methods available to you. Tuning Query Performance ‐ Query performance directly impacts the quality of the end‐user experience. As such, it is the primary benchmark used to evaluate the success of an online analytical processing (OLAP) implementation. Analysis Services provides a variety of mechanisms to accelerate query performance, including aggregations, caching, and indexed data retrieval. This section also provides guidance on writing efficient Multidimensional Expressions (MDX) calculation scripts. Tuning Processing Performance ‐ Processing is the operation that refreshes data in an Analysis Services database. The faster the processing performance, the sooner users can access refreshed data. Analysis Services provides a variety of mechanisms that you can use to influence processing performance, including parallelized processing designs, relational tuning, and an economical processing strategy (for example, incremental versus full refresh versus proactive caching). Special Considerations – Some features of Analysis Services such as distinct count measures and many‐ to‐many dimensions require more careful attention to the cube design than others. At the end of Part 1, you will find a section that describes the special techniques you should apply when using these features. 2.1 Design Patterns for Scalable Cubes Cubes present a unique challenge to the BI developer: they are ad‐hoc databases that are expected to respond to most queries in short time. The freedom of the end user is limited only by the data model