Honest Bob’s Cube Processing Bob Duffy Database Architect Prodata SQL Centre of Excellence 18 th July, 2014.

Slides:



Advertisements
Similar presentations
SQL Performance Management with SCOM 2007
Advertisements

Tuning: overview Rewrite SQL (Leccotech)Leccotech Create Index Redefine Main memory structures (SGA in Oracle) Change the Block Size Materialized Views,
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
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.
Big Data Working with Terabytes in SQL Server Andrew Novick
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 Physical Database Design Methodology Software & Hardware Mapping Logical Design to DBMS Physical Implementation Security Implementation Monitoring.
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
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.
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.
1 Robert Wijnbelt Health Check your Database A Performance Tuning Methodology.
Physical Database Design & Performance. Optimizing for Query Performance For DBs with high retrieval traffic as compared to maintenance traffic, optimizing.
Architecture Rajesh. Components of Database Engine.
Chokchai Junchey Microsoft Product Specialist Certified Technical Training Center.
Agenda for Today Do Chapter 14 Final Project Review for Final.
DONE-08 Sizing and Performance Tuning N-Tier Applications Mike Furgal Performance Manager Progress Software
© 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.
INTRODUCING SQL SERVER 2012 COLUMNSTORE INDEXES Exploring and Managing SQL Server 2012 Database Engine Improvements.
Threaded Programming Lecture 1: Concepts. 2 Overview Shared memory systems Basic Concepts in Threaded Programming.
BISM Introduction Marco Russo
Advanced MDX Tips And Tricks Chris Webb. Who Am I? Chris Webb UK-based consultant and trainer:
--A Gem of SQL Server 2012, particularly for Data Warehousing-- Present By Steven Wang.
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
OM. Platinum Level Sponsors Gold Level Sponsors Pre Conference Sponsor Venue Sponsor Key Note Sponsor.
Or How I Learned to Love the Cube…. Alexander P. Nykolaiszyn BLOG:
When Good Design Goes Bad Bob Duffy. SQLSaturday #467 Sponsors.
Honest Bob’s Cube Processing Bob Duffy Database Architect.
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.
John Sirmon Senior Escalation Engineer – Microsoft Corporation
SQL Storage Fundamentals for Azure IaaS
An introduction to Wait Statistics
Power BI Performance Tips & Tricks
Flash Storage 101 Revolutionizing Databases
- for the SSASMD Developer
Query Performance Tuning: Start to Finish
6/12/2018 2:19 PM BRK3245 DirectQuery in Analysis Services: best practices, performance, and use cases Marco Russo SQLBI © Microsoft Corporation. All rights.
Optimizing Reporting Services
SQL Server Monitoring Overview
SQL Storage Fundamentals for Azure IaaS
Power BI Performance …Tips and Techniques.
Implementing Data Models & Reports with Microsoft SQL Server
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
Processing Tabular Models
Presentation transcript:

Honest Bob’s Cube Processing Bob Duffy Database Architect Prodata SQL Centre of Excellence 18 th July, 2014

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

What we Will Cover How Processing Works Tips to Optimise Processing Benchmarking Tools Processing Options and Strategies Tips for Tabular Models

What's a cube ?

Dimension Processing

Measure Group Processing

Recap: Tuning Attribute Properties Key Column Name Column AttributeHierarchyEnabledAttributeHierarchyOptimizedAttributeHierarchyOrdered Add correct relationships Avoid Large Dimensions Or DELETE THEM

Determining Size of Objects 

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

Processing Tuning Approach Measure Object Sizes Who is hogging space Measure Process Time Where is Timing Being Spent Attributes/Dimensions Process Data Bitmap Indexes Aggregations Optimise the Cube/Dimensions Tune the Engine/Hardware Repeat Baseline

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 multidimensional-it-is-the-order-of-things/ multidimensional-it-is-the-order-of-things/

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 

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

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

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/IndexProcessStructureProcessClear

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 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

Processing Options & Strategy Dimensions Process Full ProcessDataProcessIndex Process Update ProcessAdd Cube/Measure Group ProcessFullProcessDataProcessIndexProcessAdd Can we use ROLAP ?

THE TABULAR MODEL Cube Processing Deep Dive

Tabular Processing Events

Tabular Processing Types ProcessFullProcessDataProcessAddProcessRecalcProcessDefragProcessClear

Baselining Tabular Processing 

Sizing Tool 

Optimising Columns Don’t store unused columns like fact keys Reduce Precision Split high cardinality columns Sort we improve sorting ProcessingTimeBoxSecPerMRow Review Segment Size DefaultSegmentRowCount Smaller may process faster in parallel Larger may compress better

Other Tips for tabular Replace simple calculated columns with DAX Optimise the ExecuteSQL for table scan Replace multiple ProcessFull with ProcessData and Process Recalc Avoid NUMA hardware

Should we Partition ? CANNOT be processed in parallel No support for partition elimination

Thank You

THE CRAIC SQL SATURDAY #310 DUBLIN STAY Hilton Hotel Charlemont – rooms from €159 B&B REGISTER com/310/ LEARN FROM INTERNATIONAL EXPERTS - -Sept 19th: 6 x Precons - -Sept 20th: 6 x Tracks – BI,DEV,DBA,2014,Cloud 20th Sept DUBLIN PARTY After party and entertainment during the event

Tabular Disk Structures ExtensionDescription XMLMeta Data IDFCompressed Column Store or Index DICTIONARYMap of DataID to Value HIDXAttribute Hierarchy

HARDWARE Selecting hardware for Analysis Servics

Considerations for HW SSAS does not perform well on NUMA Very sensitive to CPU and memory FE is single threaded Disk speed not as important for Tabular The intel E5/7 v2 chips are almost a must!  

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