Honest Bob’s Cube Processing Bob Duffy Database Architect.

Slides:



Advertisements
Similar presentations
Tuning: overview Rewrite SQL (Leccotech)Leccotech Create Index Redefine Main memory structures (SGA in Oracle) Change the Block Size Materialized Views,
Advertisements

Adam Jorgensen Pragmatic Works Performance Optimization in SQL Server Analysis Services 2008.
Europe’s Premier Community SQL Server Conference # SQLBITS.
Cache –Warming Strategies for Analysis Services 2008 Chris Webb Crossjoin Consulting Limited
SQL SERVER 2012 XVELOCITY COLUMNSTORE INDEX Conor Cunningham Principal Architect SQL Server Engine.
Common Mistakes Developers Make By Bryan Oliver SQL Server Mentor at SolidQ.
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)
Chapter 14 Chapter 14: Server Monitoring and Optimization.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 11 Database Performance Tuning and Query Optimization.
Making Data Warehouse Easy Conor Cunningham – Principal Architect Thomas Kejser – Principal PM.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
Fast Track, Microsoft SQL Server 2008 Parallel Data Warehouse and Traditional Data Warehouse Design BI Best Practices and Tuning for Scaling SQL Server.
Performance Investigations with Analysis Services 2012
Convergence /20/2017 © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Troubleshooting SQL Server Enterprise Geodatabase Performance Issues
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
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 10 Database Performance Tuning and Query Optimization.
Key Concepts About Performance Factors Affecting SQL Performance SQL Performance Tuning Methodologies SQL Performance Tuning Tools 1.
Workflow Manager and General Tuning Tips. Topics to discuss… Working with Workflows Working with Tasks General Tuning Tips.
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.
2 Overview of SSIS performance Troubleshooting methods Performance tips.
Physical Database Design & Performance. Optimizing for Query Performance For DBs with high retrieval traffic as compared to maintenance traffic, optimizing.
Chokchai Junchey Microsoft Product Specialist Certified Technical Training Center.
Agenda for Today Do Chapter 14 Final Project Review for Final.
Learningcomputer.com SQL Server 2008 – Profiling and Monitoring Tools.
© 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Perfmon and Profiler 101.
Amit Bansal CTO | Peopleware India (unit of eDominer Systems) | |
Srik Raghavan Principal Lead Program Manager Kevin Cox Principal Program Manager SESSION CODE: DAT206.
Troubleshooting SQL Server Performance: Tips &Tools Amit Khandelwal.
Connect with life Nauzad Kapadia Quartz Systems
INTRODUCING SQL SERVER 2012 COLUMNSTORE INDEXES Exploring and Managing SQL Server 2012 Database Engine Improvements.
SQL Query Analyzer. Graphical tool that allows you to:  Create queries and other SQL scripts and execute them against SQL Server databases. (Query window)
SQL Server Analysis Services Understanding Unified Dimension Model (UDM)
--A Gem of SQL Server 2012, particularly for Data Warehousing-- Present By Steven Wang.
Honest Bob’s Cube Processing Bob Duffy Database Architect Prodata SQL Centre of Excellence 18 th July, 2014.
Load Testing Analysis Services 30 th march 2012 Bob Duffy Database Architect Prodata SQL Centre of Excellence.
Strategies for Working with Texas-sized Databases Robert L Davis Database Engineer
Scott Fallen Sales Engineer, SQL Sentry Blog: scottfallen.blogspot.com.
When Good Design Goes Bad Bob Duffy. SQLSaturday #467 Sponsors.
No more waiting. Sponsors About me  Database Technology Specialist  MVP  Blogger  Author 3
Doing fast! Optimizing Query performance with ColumnStore Indexes in SQL Server 2012 Margarita Naumova | SQL Master Academy.
Best Practices for Columnstore Indexes Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.
SQL 2012 – Always On Deep Dive Bob Duffy Database Architect Prodata SQL Centre of Excellence 11 th April 2013.
Performance Monitoring for SQL Server Analysis Services Stan Geiger #506 | Baltimore BI 2016.
When Good Design Goes Bad Bob Duffy Database Architect Prodata SQL Centre of Excellence March 2015.
AX Performance Tools Present and Future
John Sirmon Senior Escalation Engineer – Microsoft Corporation
SQL Server Statistics and its relationship with Query Optimizer
SQL Storage Fundamentals for Azure IaaS
An introduction to Wait Statistics
Flash Storage 101 Revolutionizing Databases
- for the SSASMD Developer
Query Performance Tuning: Start to Finish
Optimizing Reporting Services
SQL Server Monitoring Overview
Four Rules For Columnstore Query Performance
SQL Storage Fundamentals for Azure IaaS
Hitting the SQL Server “Go Faster” Button
Welcome to SQL Saturday Denmark
Processing Analysis Services Tabular Models
Designing Complex Tabular Models
Four Rules For Columnstore Query Performance
Hybrid Power BI With the on Premise Data Gateway
Bob Duffy 27 years in database sector, 250+ projects
Using Columnstore indexes in Azure DevOps Services. Lessons learned
Using Columnstore indexes in Azure DevOps Services. Lessons learned
Using wait stats to determine why my server is slow
Processing Tabular Models
Presentation transcript:

Honest Bob’s Cube Processing Bob Duffy Database Architect

Thank you to our sponsors!

Speaker - Bob Duffy  20 years in database sector, 250+ projects  Senior Consultant with Microsoft  One of about 25 MCA for SQL Server globally (aka SQL Ranger)  SQL MCM on SQL 2005 and 2008  SQL Server MVP  SSAS Maestro  Database Architect at Prodata SQL Centre of Excellence  

What we Will Cover  Processing Internals  Dimensions Deep Dive  Measure Group Deep Dive  Tuning Patterns  Baseline Harness  Case Study

What's a cube ?

Dimension Processing

Measure Group Processing

Recap: Tuning Attribute Properties  Key Column  Name Column  AttributeHierarchyEnabled  AttributeHierarchyOptimized  AttributeHierarchyOrdered  Add correct relationships  Avoid Large Dimensions  Or  DELETE THEM

Dimension / Fact Structures ExtensionDescription Kstore, Asstore, Ahstore, bStore, Ahstore Attribute Stored DstoreHierarchy Decode Store lStoreHierarchy Child/Parent Structure SstoreSet Store. Ancestors of a level oStoreOrder Store. Contains Position of each level. BstoreBlob Store MapBitmap Index ExtensionDescription Fact.dataRaw Fact Data Map, HdrBitmap index Files Agg.flex.dataFlexible Aggregations Aff.Rigid.dataRigid Aggregations

Determining Size of Objects

Slow Execute SQL ? 1.Check WAIT Statistics What does ASYNC_NETWORK mean ? 2.For Dimensions Optimise for Select Distinct Or Switch “by Table Mode” 3.For Facts 1.Ensure narrow base table (no joins!) 2.Optimise Scan speed 512k Read Ahead Fast Disks Good File Group Layout No Extent Fragmentation (-E trace flag)

Process Data  Review Grain  Increase BufferRecordLimit  Or Aggregate in SQL  Too many Measures ?  Use Calculated Measures  Do we have disk bottleneck  Do we have Network bottleneck  Are we consuming a lot of CPU  Match SSAS to SQL Types  Idle Server Resources  Increase Parallelism

Optimising Bitmap Indexes 1.Optimise Attributes on Dimensions 2.Ensure good CPUs ! 3.Ensure max parallelism 4.Don’t over partition 5.Will sorting and Compression Help ?

Optimising Compression by Sorting  Each Segment in MOLAP is 64k

Optimising Aggregations  Use correct Attribute Relationships  Don’t over aggregate (say 20)  Consider consolidating aggregations  Avoid spilling to disk  Ensure max parallelism  CPU should be saturated!

Benchmarking Processing Time  Use XMLA to Process interesting objects  Use XMLA to capture a trace file  Use logman to capture perfmon counters  Disk throughput and latency  CPU  SSAS Threads  Automate with a batch file

Analysing the Trace File

Processing Options/Strategy  Process Full  Drops related Fact data!  Process Update  May drop flexible Aggregations and Indexes  Will bloat over time  Process Add  Fastest Processing Option  Not available via GUI  Other Process Commands  ProcessData/Index  ProcessStructure  ProcessClear

Perfmon Counters ObjectCounter Processor% Processor Time Logical DiskAvg. Disk sec/Transfer Disk Transfers/Sec ProcessingRows Read/sec Proc IndexRows/sec Proc AggregationsRows Created/Sec Temp file bytes written/sec Current Partitions ThreadsProcessing pool idle threads Processing pool job queue length Processing pool busy threads MemoryMemory Usage Kb High/Low too

ENGINE TUNING TIPS

Connection String  Check Data Source  Try OLEDB driver instead of SqlClient  Max TCP/IP Packet Size set to 32,756  Up default connections from 10  Don’t use TCP/IP on shared server

INI Settings (before 2012)  See Analysis Services Performance Tuning paper INI SettingImpact OLAP\Process\ AggregationMemoryLimitMin AggregationMemoryLimitMax Increase Max if spill to disk Decrease Min if lots of partitions ThreadPool\Process\MaxThreadsIncrease if maxed out CoordinatorExecutionModeIncrease Threads per core BufferMemoryLimitImprove data grouping TempDirCan place on faster disk

Partitioning Strategies  For Processing  At least one partition per core  Try and make even size  Ensure fact.data smaller than index/agg data  Use Partitions to avoid updating all data

Case Study – Tuning AW  Size Before  8.8 GB Data, 1.2 GB Index  Size After  8.5 GB, 0.8 GB Index

Case Study II – Retail Cube Baseline  2.5 Hours Starting Point for 350GB cube

Case Study II – Data Types  All Numeric Converted to money or float in sql view.  30% decrease in time for ProcessData

Case Study II – Attribute/Aggs  53% overall reduction in cube size  55% reduction in Aggregations  73% reduction in size of Bitmap Indexes

Case Study II – Tuning the TSQL  Need to denormalise Fact Table

References  Excel Tool for Analysing Process Time   Excel tool for MOLAP disk space analysis   Scripts for baselining Cube Processing 

Your feedback is important! Please let us know what you thought of this session

Thank You

Near Real Time Processing  Process recent partitions frequently  Queries can Block Process Commit  Consider adjusting “ForceCommitTimeout”  Or “Cube flipping”  Tip: Only Consider ROLAP as a last resort

Scale Out  MOLAP does not really “scale up” for querying