Introduction to columnstore indexes Taras Bobrovytskyi SQL wincor nixdorf.

Slides:



Advertisements
Similar presentations
Project Management Database and SQL Server Katmai New Features Qingsong Yao
Advertisements

Working with SQL Server Database Objects
Module 4: Creating Data Types and Tables. Overview Creating Data Types Creating Tables Generating Column Values Generating Scripts.
SQL components In Oracle. SQL in Oracle SQL is made up of 4 components: –DDL Data Definition Language CREATE, ALTER, DROP, TRUNCATE. Creates / Alters.
DATABASES AND SQL. Introduction Relation: Relation means table(data is arranged in rows and columns) Domain : A domain is a pool of values appearing in.
Chapter 9 SQL and RDBMS Part C. SQL Copyright 2005 Radian Publishing Co.
 SQL stands for Structured Query Language.  SQL lets you access and manipulate databases.  SQL is an ANSI (American National Standards Institute) standard.
Chapter 7 SQL HUANG XUEHUA. SQL SQL server2005 introduction Install components  management studio.
Module 3 Designing a Physical Database Model. Module Overview Selecting Data Types Designing Database Tables Designing Data Integrity.
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.
SQL Data Definition Language (DDL) Using Microsoft SQL Server 1SDL Data Definition Language (DDL)
Table Indexing for the.NET Developer Denny Cherry twitter.com/mrdenny.
Unit 6 Data Storage Design. Key Concepts 1. Database overview 2. SQL review 3. Designing fields 4. Denormalization 5. File organization 6. Object-relational.
1 Structured Query Language (SQL). 2 Contents SQL – I SQL – II SQL – III SQL – IV.
Denny Cherry twitter.com/mrdenny.
Module 3: Creating Data Types and Tables. Overview Working with Data Types Working with Tables Generating Column Values Generating Scripts.
Topic 1: Introduction to SQL. SQL stands for Structured Query Language. SQL is a standard computer language for accessing and manipulating databases SQL.
SQL Fundamentals  SQL: Structured Query Language is a simple and powerful language used to create, access, and manipulate data and structure in the database.
Denny Cherry twitter.com/mrdenny.
Indexes / Session 2/ 1 of 36 Session 2 Module 3: Types of Indexes Module 4: Maintaining Indexes.
Data Types Lesson 4. Skills Matrix Table A table stores your data. Tables are relational in that they are organized as rows and columns (a matrix). Each.
Introduction to Database System Adisak Intana Lecturer Chapter 7 : Data Integrity.
Indexes and Views Unit 7.
INTRODUCING SQL SERVER 2012 COLUMNSTORE INDEXES Exploring and Managing SQL Server 2012 Database Engine Improvements.
SQL SERVER DAYS 2011 Indexing Internals Denny Cherry twitter.com/mrdenny.
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.
SQLUG.be Case study: Redesign CDR archiving on SQL Server 2012 By Ludo Bernaerts April 16,2012.
Advanced SQL - DDL Advanced Database Dr. AlaaEddin Almabhouh.
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.
A Lap Around Columstore Martin Catherall SQL Saturday #464, Melbourne 20 th February 2016.
Database Constraints Ashima Wadhwa. Database Constraints Database constraints are restrictions on the contents of the database or on database operations.
SQL, the Structured Query Language
Columnstore Indexing: From SQL Server 2012 to SQL Server 2014
In-Memory Capabilities
Managing Tables, Data Integrity, Constraints by Adrienne Watt
Insert, Update and the rest…
Module 2: Creating Data Types and Tables
Temporal Databases Microsoft SQL Server 2016
Introduction to SQL 2016 Temporal Tables
SQL Server 2016 JSON Support FOR Data Warehousing
SQL Implementation & Administration
The Five Ws of Columnstore Indexes
Module 5: Implementing Data Integrity by Using Constraints
Migrating a Disk-based Table to a Memory-optimized one in SQL Server
PREMIER SPONSOR GOLD SPONSORS SILVER SPONSORS BRONZE SPONSORS SUPPORTERS.
ColumnStore Index Primer
Introduction to columnstore indexes
Introduction to partitioning
TechEd /20/ :49 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered.
SQL OVERVIEW DEFINING A SCHEMA
11/29/2018 © 2014 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks and/or trademarks.
Database systems Lecture 2 – Data Types
TechEd /2/2018 7:32 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
“Manipulating Data” Lecture 6.
Microsoft SQL Server 2014 for Oracle DBAs Module 7
The Five Ws of Columnstore Indexes
“Manipulating Data” Lecture 6.
Realtime Analytics OLAP & OLTP in the mix
Sunil Agarwal | Principal Program Manager
Session - 6 Sequence - 1 SQL: The Structured Query Language:
Why Should I Care About … Partitioned Views?
Clustered Columnstore Indexes (SQL Server 2014)
Nifty trick to compress LOB data
Instructor: Samia arshad
SQL Server Columnar Storage
Sunil Agarwal | Principal Program Manager
Presentation transcript:

Introduction to columnstore indexes Taras Bobrovytskyi SQL wincor nixdorf

Our Sponsors:

Introduction to columnstore indexes  General overview  Creating columnstore indexes  Storage  Usage scenarios

General overview  Part of MS in-memory processing strategy  Large data

Creating columnstore index  Syntax  Restrictions  Memory usage

Syntax CREATE NONCLUSTERED COLUMNSTORE INDEX [csindx_FactResellerSales] ON [FactResellerSales] ( [OrderQuantity], [UnitPrice], [ExtendedAmount], [UnitPriceDiscountPct], [DiscountAmount], [ProductStandardCost], [TotalProductCost], [SalesAmount], [TaxAmt], [Freight], [CarrierTrackingNumber], [CustomerPONumber], [OrderDate], [DueDate], [ShipDate] );

Restrictions – data types  binary and varbinary  ntext, text, and image  varchar(max) and nvarchar(max)  uniqueidentifier  rowversion (and timestamp)  sql_variant  decimal (and numeric) with precision greater than 18 digits  datetimeoffset with scale greater than 2  CLR types (hierarchyid and spatial types)  xml

Restrictions  Cannot have more than 1024 columns.  Cannot be clustered. Only nonclustered columnstore indexes are available. (2012 version only)  Cannot be a unique index.  Cannot be created on a view or indexed view.  Cannot include a sparse column.  Cannot act as a primary key or a foreign key.  Cannot be changed using the ALTER INDEX statement (since 2014 – REBUILD,REORGANIZE).  Cannot be created with the INCLUDE keyword.  Cannot include the ASC or DESC  Cannot contain a column with a FILESTREAM attribute.

Memory usage  MG= ((4.2*CN)+68)*PN+CCN*34  MG – memory grant (in MB)  CN – number of columns in columnstore index  PN – number of processors  CCN – number of character columns

Memory usage  Alter default workload group to increase the request memory grant ALTER WORKLOAD GROUP [DEFAULT] WITH (REQUEST_MAX_MEMORY_GRANT_PERCENT=75) ALTER RESOURCE GOVERNOR RECONFIGURE

Storage

Nonclustered columnstore

Clustered columnstore

Usage scenarios  Selecting data  Updating data  Rebuild index

Selecting data from columnstore SELECT SalesTerritoryKey, SUM(ExtendedAmount) AS SalesByTerritory FROM FactResellerSalesPtnd GROUP BY SalesTerritoryKey;

Updating data  Nonclustered indexes

Updating data  Nonclustered Index ALTER INDEX mycolumnstoreindex ON mytable DISABLE; -- update mytable – ALTER INDEX mycolumnstoreindex on mytable REBUILD

Updating data  Partitioned table scenario  Staging table for data updating ALTER TABLE FactInternetSales_Partitioned SWITCH PARTITION 1 TO FactInternetSales_Stage

Updating data  Clustered indexes CREATE TABLE T1( ProductKey [int] NOT NULL, OrderDateKey [int] NOT NULL, DueDateKey [int] NOT NULL, ShipDateKey [int] NOT NULL); GO CREATE CLUSTERED COLUMNSTORE INDEX cci_T1 ON T1; GO

Updating data  Clustered indexes  Normal DML/Bulk operations

Updating data  Clustered indexes

Updating data

 DML operations on clustered columnstore  INSERT  adds row to deltastore  Tuple mover moves filled deltastore rowgroup to columnstore  DELETE  Marks row as deleted in columnstore  Removed on index rebuild  UPDATE  DELETE  INSERT

Rebuilding index  Nonclustered indexes  Clustered indexes  Delete bitmaps applied  Defragmentation of columnstore  Merge with deltastore

What’s next?  Vertipaq compression  New columnstore features in 2016