Best Practices for Columnstore Indexes Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.

Slides:



Advertisements
Similar presentations
Big Data Working with Terabytes in SQL Server Andrew Novick
Advertisements

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)
GETTING STARTED WITH AZURE SQL DB Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.
6.814/6.830 Lecture 8 Memory Management. Column Representation Reduces Scan Time Idea: Store each column in a separate file GM AAPL.
IIS Server ETL IIS Server This is OPERATIONAL ANALYTICS.
Cloud Computing Lecture Column Store – alternative organization for big relational data.
Oracle Data Block Oracle Concepts Manual. Oracle Rows Oracle Concepts Manual.
SQL Server Indexes Indexes. Overview Indexes are used to help speed search results in a database. A careful use of indexes can greatly improve search.
T-SQL: Simple Changes That Go a Long Way DAVE ingeniousSQL.com linkedin.com/in/ingenioussql.
Indexes / Session 2/ 1 of 36 Session 2 Module 3: Types of Indexes Module 4: Maintaining Indexes.
Srik Raghavan Principal Lead Program Manager Kevin Cox Principal Program Manager SESSION CODE: DAT206.
SQL Server 2005 Engine Optimistic Concurrency Tony Rogerson, SQL Server MVP Independent Consultant 26 th.
Sofia Event Center November 2013 Margarita Naumova SQL Master Academy.
5 Trends in the Data Warehousing Space Source: TDWI Report – Next Generation DW.
October 15-18, 2013 Charlotte, NC Accelerating Database Performance Using Compression Joseph D’Antoni, Solutions Architect Anexinet.
Boosting DWH-Performance with SQL Server 2016 ColumnStore Index.
--A Gem of SQL Server 2012, particularly for Data Warehousing-- Present By Steven Wang.
Scott Fallen Sales Engineer, SQL Sentry Blog: scottfallen.blogspot.com.
Execution Plans Detail From Zero to Hero İsmail Adar.
Scaling out and in with Azure SQL DB Elastic Scale DBA-203 Warner Chaves, MCM/MVP, SQLTurbo.com, Pythian.com.
Oracle Announced New In- Memory Database G1 Emre Eftelioglu, Fen Liu [09/27/13] 1 [1]
Doing fast! Optimizing Query performance with ColumnStore Indexes in SQL Server 2012 Margarita Naumova | SQL Master Academy.
SQL Server as a Cloud Service April 15th 2016 Warner Chaves Data Platform MVP/SQL Server MCM.
SQL Server 2016: Real-time operational analytics
A Lap Around Columstore Martin Catherall SQL Saturday #464, Melbourne 20 th February 2016.
Introducing Hekaton The next step in SQL Server OLTP performance Mladen Prajdić
Use Cases for In-Memory OLTP Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com.
Memory-Optimized Tables Querying at the speed of light.
IIS Server ETL Key Issues  Complex Implementation  Requires two Servers (CapEx and OpEx)  Data Latency in Analytics  More businesses demand/require.
Cloud Database Platforms for the SQL DBA
Enable Operational Analytics (HTAP) in SQL Server 2016 and Azure SQL Database Sunil Agarwal Principal Program Manager, SQL Server Product Tiger Team
Clustered Columnstore index deep dive
Data Warehouse ETL By Garrett EDmondson Thanks to our Gold Sponsors:
In-Memory Capabilities
Temporal Databases Microsoft SQL Server 2016
Real Time Data with Azure and Power BI
Operational Analytics in SQL Server 2016 and Azure SQL Database
Temporal Databases Microsoft SQL Server 2016
UFC #1433 In-Memory tables 2014 vs 2016
T-SQL: Simple Changes That Go a Long Way
Design Seamless Upgrades to SQL Server 2016 with Query Store
Four Rules For Columnstore Query Performance
Warner Chaves MCM / MVP / SQLTurbo.com / Pythian.com
Azure SQL Data Warehouse for SQL Server DBAS
The Five Ws of Columnstore Indexes
Blazing-Fast Performance:
Working with Very Large Tables Like a Pro in SQL Server 2014
PREMIER SPONSOR GOLD SPONSORS SILVER SPONSORS BRONZE SPONSORS SUPPORTERS.
ColumnStore Index Primer
Azure SQL Data Warehouse Performance Tuning
Azure SQL Data Warehouse for SQL Server DBAS
20 Questions with Azure SQL Data Warehouse
11/29/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Understanding Azure SQL DB Service Tiers
Warner Chaves MCM / MVP / SQLTurbo.com / Pythian.com
Cloud Data Replication with SQL Data Sync
The Five Ws of Columnstore Indexes
Warner Chaves MCM / MVP / SQLTurbo.com / Pythian.com
Realtime Analytics OLAP & OLTP in the mix
What’s new with SQL Server
Sunil Agarwal | Principal Program Manager
Four Rules For Columnstore Query Performance
Clustered Columnstore Indexes (SQL Server 2014)
CSTORE E0261 Jayant Haritsa Computer Science and Automation
Using Columnstore indexes in Azure DevOps Services. Lessons learned
Using Columnstore indexes in Azure DevOps Services. Lessons learned
SQL Server Columnar Storage
SQL Server 2016 High Performance Database Offer.
Using Columnstore indexes in Azure DevOps Services. Lessons learned.
Sunil Agarwal | Principal Program Manager
Presentation transcript:

Best Practices for Columnstore Indexes Warner Chaves SQL MCM / MVP SQLTurbo.com Pythian.com

Bio  SQL Server DBA for 10 years.  Previously an L3 DBA at HP, now a Principal Consultant at Pythian in Ottawa Ontario.  SQL Server MCM and MVP.    Blog: sqlturbo.com  Company site: pythian.com

Agenda  GOAL: simple and straightforward intro to best practices when working with Columnstore Indexes.  We’ll cover:  Brief intro to Columnstores and their use cases.  Demo: fast loading of a Non-clustered columnstore index.  Demo: loading a clustered Columnstore without hitting the Delta store.  Demo: deleting data off a Columnstore.  Demo: Batch mode and segment elimination.

What is it?  Optimized columnar storage for analytic style queries.  Used for large amounts of data ingestion and reading.  It’s a static index on SQL 2012, read-write on  Enterprise license required or Azure SQL Premium tier.

What’s the big deal?  Big benefits for data warehouse tables.  Really high compression on the columnar format.  Batch mode can process rows with higher throughput.  Simplifies the management of large warehousing tables.  The queries that it’s optimized for will perform better.

Columnstore structure Rowgroups: grouping of records, records max. Column segment: storage unit, a rowgroup is split into segments, one per column. Deltastore: used by clustered Columnstores as temp storage for new records. Inserts with records avoid the Deltastore. Deleted records b-tree: clustered Columnstores keep an internal table identifying deleted records. This is also kept on an in-memory structure for fast access. Tuple-mover: this process checks the deltastore for full rowgroups (closed) to compress and move to the columnstore.

Let’s go over it

Demos!  Demo: fast loading of a Non-clustered columnstore index.  Demo: loading a clustered Columnstore without hitting the Delta store.  Demo: deleting data off a Columnstore.  Demo: taking full advantage of Batch mode.

Summary  If possible combine with partitioning (a must for the non- clustered variation).  Bulk load and avoid small trickle inserts. Delayed Durability is a plus.  Verify queries are using batch mode and work around any batch mode inhibitors. Avoid MAXDOP 1.

Summary (2)  Tuple mover is single thread, REORG is multi-thread.  Maintain stats but watch out for auto update triggering.  Monitor segment sizes and deleted row amounts, REBUILD if necessary.  Exploit sort order if possible for SEGMENT elimination.

Future ahead  New Features for SQL 2016: – Parallel insert. – Nonclustered B-tree indexes on top of the columnstore. – Read/write nonclustered columnstore on top of a regular clustered index. – In-memory columnstore on in-memory oltp table. – More T-SQL constructs run in batch mode (including sorting). – More predicates and aggregates pushed down to the storage engine. – REORGANIZE will remove deleted rows and merge small rowgroups, online. – New DMVs, XEvents and Perfmon counters. – Support for RCSI or Snapshot isolation. – Fully readable on an Availability Groups secondary.  Check videos of the sessions from Ignite 2015 on channel9.microsoft.com

QA?