SlideShare ist ein Scribd-Unternehmen logo
1 von 34
Downloaden Sie, um offline zu lesen
Introduction to Columnstore Indexes
Jason
Strate
e: jstrate@pragmaticworks.com
e: jasonstrate@gmail.com
b: www.jasonstrate.com
t: StrateSQL
Resources jasonstrate.com/go/indexing
Introduction
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
• Industry leaders in Microsoft BI and SQL Server
Platform
• SQL Server Professionals - PASS Board of Directors,
Speakers, Authors and MVP’s
• National Sales Team Divided by Microsoft
Territories
• National System Integrator (NSI)
• Gold Certified in Business Intelligence and Data
Platform
• Platform Modernization/Safe Passage
• Premier Partner for PDW SI Partner Program
MS PDW Partner of Year FY13
Frontline Partnership Partner of the Year for Big Data
Executive sponsor - Andy Mouacdie, WW sales director
PDW
• Over 7,200 customers worldwide
• Over 186,000 people in PW database for demand
generation
About Pragmatic Works
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
Everyone wants
fast queries
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
Sometimes Normal
Doesn’t Make Sense
We need to change
what we do
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
To get things
back to normal
Agenda
Introduction Columnstore Basics
SQL Server
Columnstore
Non-Clustered
Columnstore
Clustered
Columnstore
Summary
Agenda
Introduction Columnstore Basics
SQL Server
Columnstore
Non-Clustered
Columnstore
Clustered
Columnstore
Summary
Session Goals
• Identify differences between rowstore and
columnstore indexes
• Describe implementation of columnstore index
in SQL Server
• Define pros and cons with columnstore indexes
• Demonstrate use of columnstore indexes
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
Agenda
Introduction Columnstore Basics
SQL Server
Columnstore
Non-Clustered
Columnstore
Clustered
Columnstore
Summary
Index Problems
• Indexes traditionally are row-based
– All columns for row stored together
• Any column read brings over all columns
– Impacts IO, CPU, and memory
– Typically 15% of DW columns in queries
• Databases growing 10x every 5 years
• Tuning for over indexing, under indexing, and
bookmark lookups
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
Columnstore Basics
• Change data storage from row to column
based
– Rowstores
– Columnstores
• Data grouped by columns
– One column per grouping (segment)
– Data access at columns level
– Only return columns required for query
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
Say
What?!
Traditional Index
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
Columnstore Index
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
Columnstore Index
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
Why Columnstore?
• Improved query performance
– Column centric reads
– Heavy data compression
– Processing by batch versus row
• Improved resource utilization
– Smaller index space
– Less memory required
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
Agenda
Introduction Columnstore Basics
SQL Server
Columnstore
Non-Clustered
Columnstore
Clustered
Columnstore
Summary
SQL Server Columnstore
• Introduced to improve data warehouse
performance
• Available since SQL Server 2012
• SQL Server 2012
– Non-clustered columnstore
• SQL Server 2014
– Clustered columnstore
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
Columnstore Attributes
• Introduced in SQL Server 2012
• Supports batch mode processing
• SQL Server 2012
– Non-clustered columnstore
– No key columns
– Support partitioning
– Read only index
• SQL Server 2014
– Clustered columnstore
– Columnstore archive format
– Readwrite when clustered
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
Batch-mode Processing
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
1 record versus 415 records
Columnstore Restrictions
• 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 created with
the INCLUDE keyword
• Cannot include
the ASC or DESC keywords for
sorting the index
• No seek operations
• Cannot contain a column with a
FILESTREAM attribute
• Limited data types
– Except varchar(max),
nvarchar(max), binary,
varbinary, ntext, text, image,
uniqueidentifier, rowversion,
timestamp, sqlvariant, xml, CLR
types
• Feature restrictions
– Replication
– Change tracking
– Change data capture
– Filestream
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
Agenda
Introduction Columnstore Basics
SQL Server
Columnstore
Non-Clustered
Columnstore
Clustered
Columnstore
Summary
Non-Clustered Columnstore
• Available in:
– SQL Server 2012
– SQL Server 2012 Parallel Data Warehouse
– SQL Server 2014
• One non-clustered columnstore per table
– Support tables heap or clustered index
• Add in all columns from table
– No key columns
• Best support star-join style queries
• Avoid OUTER JOIN and NOT IN
– Prevent batch processing
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
Updating Non-Clustered Columnstore
• Drop the columnstore
• Perform DML
• Recreate columnstore
Drop and
Rebuild
• Create new partition with modified data
• Create columnstore
• Switch in partition
Partition
Switch
• Apply changes to separate table
• UNION ALL columnstore or change table
• Manage DML through trigger
Partitioned
View
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
NON-CLUSTERED COLUMNSTORE
Demo
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
Agenda
Introduction Columnstore Basics
SQL Server
Columnstore
Non-Clustered
Columnstore
Clustered
Columnstore
Summary
Clustered Columnstore
• Available in:
– SQL Server 2012 Parallel Data Warehouse
– SQL Server 2014
• One clustered columnstore per table
– Is primary storage for data
– Reduces space requirements
• Can leverage columnstore archive format
• Same design patterns as non-clustered
• Preferred over non-clustered columnstore
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
CLUSTERED COLUMNSTORE
Demo
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
Agenda
Introduction Columnstore Basics
SQL Server
Columnstore
Non-Clustered
Columnstore
Clustered
Columnstore
Summary
Summary
• Columnstore indexes change data can be
accessed
• Provides increased data compression
• Retrieves only the columns that are needed
• Primary benefit in data warehouses
– Slowly or unchanging data
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
More Information
Expert Performance Indexing
For SQL Server 2012
Jason Strate
Ted Krueger
Overview
Statistics
Maintenance
Tools
Analysis
http://amzn.com/1430237414
MAKING BUSINESS INTELLIGENT
www.pragmaticworks.com
Services
Speed development through training, and
rapid development services from
Pragmatic Works.
Products
BI products to covert to a Microsoft BI
platform and simplify development on
the platform.
Foundation
Helping those who do not have the
means to get into information technology
achieve their dreams.
For more information…
Name: Jason Strate
Email: jstrate@pragmaticworks.com
Blog: www.jasonstrate.com
Resource: jasonstrate.com/go/indexing
Need Help? jasonstrate.com/go/vmdba

Weitere ähnliche Inhalte

Was ist angesagt?

Azure Synapse Analytics Overview (r2)
Azure Synapse Analytics Overview (r2)Azure Synapse Analytics Overview (r2)
Azure Synapse Analytics Overview (r2)James Serra
 
Azure Data Factory Data Flow
Azure Data Factory Data FlowAzure Data Factory Data Flow
Azure Data Factory Data FlowMark Kromer
 
Azure Synapse Analytics Overview (r1)
Azure Synapse Analytics Overview (r1)Azure Synapse Analytics Overview (r1)
Azure Synapse Analytics Overview (r1)James Serra
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)Aurimas Mikalauskas
 
Active directory domain and trust
Active directory domain and trustActive directory domain and trust
Active directory domain and trustChinmoy Jena
 
Getting Started with Delta Lake on Databricks
Getting Started with Delta Lake on DatabricksGetting Started with Delta Lake on Databricks
Getting Started with Delta Lake on DatabricksKnoldus Inc.
 
Advanced Load Balancer/Traffic Manager and App Gateway for Microsoft Azure
Advanced Load Balancer/Traffic Manager and App Gateway for Microsoft AzureAdvanced Load Balancer/Traffic Manager and App Gateway for Microsoft Azure
Advanced Load Balancer/Traffic Manager and App Gateway for Microsoft AzureKemp
 
Data Mesh using Microsoft Fabric
Data Mesh using Microsoft FabricData Mesh using Microsoft Fabric
Data Mesh using Microsoft FabricNathan Bijnens
 
Data platform modernization with Databricks.pptx
Data platform modernization with Databricks.pptxData platform modernization with Databricks.pptx
Data platform modernization with Databricks.pptxCalvinSim10
 
Owning Your Own (Data) Lake House
Owning Your Own (Data) Lake HouseOwning Your Own (Data) Lake House
Owning Your Own (Data) Lake HouseData Con LA
 
Big Data and Data Warehousing Together with Azure Synapse Analytics (SQLBits ...
Big Data and Data Warehousing Together with Azure Synapse Analytics (SQLBits ...Big Data and Data Warehousing Together with Azure Synapse Analytics (SQLBits ...
Big Data and Data Warehousing Together with Azure Synapse Analytics (SQLBits ...Michael Rys
 
Fantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemFantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemRoss Wolf
 
SEIM-Microsoft Sentinel.pptx
SEIM-Microsoft Sentinel.pptxSEIM-Microsoft Sentinel.pptx
SEIM-Microsoft Sentinel.pptxAmrMousa51
 
Enabling a Data Mesh Architecture with Data Virtualization
Enabling a Data Mesh Architecture with Data VirtualizationEnabling a Data Mesh Architecture with Data Virtualization
Enabling a Data Mesh Architecture with Data VirtualizationDenodo
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseJames Serra
 
Microsoft Azure Security Overview
Microsoft Azure Security OverviewMicrosoft Azure Security Overview
Microsoft Azure Security OverviewAlert Logic
 
Should I move my database to the cloud?
Should I move my database to the cloud?Should I move my database to the cloud?
Should I move my database to the cloud?James Serra
 
Analytics in a Day Virtual Workshop
Analytics in a Day Virtual WorkshopAnalytics in a Day Virtual Workshop
Analytics in a Day Virtual WorkshopCCG
 
Making Data Timelier and More Reliable with Lakehouse Technology
Making Data Timelier and More Reliable with Lakehouse TechnologyMaking Data Timelier and More Reliable with Lakehouse Technology
Making Data Timelier and More Reliable with Lakehouse TechnologyMatei Zaharia
 

Was ist angesagt? (20)

Azure Synapse Analytics Overview (r2)
Azure Synapse Analytics Overview (r2)Azure Synapse Analytics Overview (r2)
Azure Synapse Analytics Overview (r2)
 
Azure Data Factory Data Flow
Azure Data Factory Data FlowAzure Data Factory Data Flow
Azure Data Factory Data Flow
 
Azure Synapse Analytics Overview (r1)
Azure Synapse Analytics Overview (r1)Azure Synapse Analytics Overview (r1)
Azure Synapse Analytics Overview (r1)
 
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
MySQL Performance Tuning. Part 1: MySQL Configuration (includes MySQL 5.7)
 
Active directory domain and trust
Active directory domain and trustActive directory domain and trust
Active directory domain and trust
 
Azure Sentinel
Azure SentinelAzure Sentinel
Azure Sentinel
 
Getting Started with Delta Lake on Databricks
Getting Started with Delta Lake on DatabricksGetting Started with Delta Lake on Databricks
Getting Started with Delta Lake on Databricks
 
Advanced Load Balancer/Traffic Manager and App Gateway for Microsoft Azure
Advanced Load Balancer/Traffic Manager and App Gateway for Microsoft AzureAdvanced Load Balancer/Traffic Manager and App Gateway for Microsoft Azure
Advanced Load Balancer/Traffic Manager and App Gateway for Microsoft Azure
 
Data Mesh using Microsoft Fabric
Data Mesh using Microsoft FabricData Mesh using Microsoft Fabric
Data Mesh using Microsoft Fabric
 
Data platform modernization with Databricks.pptx
Data platform modernization with Databricks.pptxData platform modernization with Databricks.pptx
Data platform modernization with Databricks.pptx
 
Owning Your Own (Data) Lake House
Owning Your Own (Data) Lake HouseOwning Your Own (Data) Lake House
Owning Your Own (Data) Lake House
 
Big Data and Data Warehousing Together with Azure Synapse Analytics (SQLBits ...
Big Data and Data Warehousing Together with Azure Synapse Analytics (SQLBits ...Big Data and Data Warehousing Together with Azure Synapse Analytics (SQLBits ...
Big Data and Data Warehousing Together with Azure Synapse Analytics (SQLBits ...
 
Fantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find ThemFantastic Red Team Attacks and How to Find Them
Fantastic Red Team Attacks and How to Find Them
 
SEIM-Microsoft Sentinel.pptx
SEIM-Microsoft Sentinel.pptxSEIM-Microsoft Sentinel.pptx
SEIM-Microsoft Sentinel.pptx
 
Enabling a Data Mesh Architecture with Data Virtualization
Enabling a Data Mesh Architecture with Data VirtualizationEnabling a Data Mesh Architecture with Data Virtualization
Enabling a Data Mesh Architecture with Data Virtualization
 
Introducing Azure SQL Data Warehouse
Introducing Azure SQL Data WarehouseIntroducing Azure SQL Data Warehouse
Introducing Azure SQL Data Warehouse
 
Microsoft Azure Security Overview
Microsoft Azure Security OverviewMicrosoft Azure Security Overview
Microsoft Azure Security Overview
 
Should I move my database to the cloud?
Should I move my database to the cloud?Should I move my database to the cloud?
Should I move my database to the cloud?
 
Analytics in a Day Virtual Workshop
Analytics in a Day Virtual WorkshopAnalytics in a Day Virtual Workshop
Analytics in a Day Virtual Workshop
 
Making Data Timelier and More Reliable with Lakehouse Technology
Making Data Timelier and More Reliable with Lakehouse TechnologyMaking Data Timelier and More Reliable with Lakehouse Technology
Making Data Timelier and More Reliable with Lakehouse Technology
 

Ähnlich wie Introduction to Columnstore Indexes

The Flavors of Non-Clustered Indexes
The Flavors of Non-Clustered IndexesThe Flavors of Non-Clustered Indexes
The Flavors of Non-Clustered IndexesJason Strate
 
Columnstore improvements in SQL Server 2016
Columnstore improvements in SQL Server 2016Columnstore improvements in SQL Server 2016
Columnstore improvements in SQL Server 2016Niko Neugebauer
 
Data Warehouse approaches with Dynamics AX
Data Warehouse  approaches with Dynamics AXData Warehouse  approaches with Dynamics AX
Data Warehouse approaches with Dynamics AXAlvin You
 
How Do Non-Clustered Indexes Improve Performance?
How Do Non-Clustered Indexes Improve Performance?How Do Non-Clustered Indexes Improve Performance?
How Do Non-Clustered Indexes Improve Performance?Jason Strate
 
Real-world BISM in SQL Server 2012 SSAS
Real-world BISM in SQL Server 2012 SSASReal-world BISM in SQL Server 2012 SSAS
Real-world BISM in SQL Server 2012 SSASLynn Langit
 
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...Denny Lee
 
Oracle Database 12c - Features for Big Data
Oracle Database 12c - Features for Big DataOracle Database 12c - Features for Big Data
Oracle Database 12c - Features for Big DataAbishek V S
 
Le novità di sql server 2019
Le novità di sql server 2019Le novità di sql server 2019
Le novità di sql server 2019Gianluca Hotz
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Antonios Chatzipavlis
 
Clustered Columnstore Introduction
Clustered Columnstore IntroductionClustered Columnstore Introduction
Clustered Columnstore IntroductionNiko Neugebauer
 
Optimising Queries - Series 4 Designing Effective Indexes
Optimising Queries - Series 4 Designing Effective IndexesOptimising Queries - Series 4 Designing Effective Indexes
Optimising Queries - Series 4 Designing Effective IndexesDAGEOP LTD
 
Pr dc 2015 sql server is cheaper than open source
Pr dc 2015 sql server is cheaper than open sourcePr dc 2015 sql server is cheaper than open source
Pr dc 2015 sql server is cheaper than open sourceTerry Bunio
 
Configuring Sage 500 for Performance
Configuring Sage 500 for PerformanceConfiguring Sage 500 for Performance
Configuring Sage 500 for PerformanceRKLeSolutions
 
Introduction to Clustered Indexes and Heaps
Introduction to Clustered Indexes and HeapsIntroduction to Clustered Indexes and Heaps
Introduction to Clustered Indexes and HeapsJason Strate
 
SSAS Design & Incremental Processing - PASSMN May 2010
SSAS Design & Incremental Processing - PASSMN May 2010SSAS Design & Incremental Processing - PASSMN May 2010
SSAS Design & Incremental Processing - PASSMN May 2010Dan English
 
Improve power bi performance
Improve power bi performanceImprove power bi performance
Improve power bi performanceAnnie Xu
 
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL ServerGeek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL ServerIDERA Software
 
Designing high performance datawarehouse
Designing high performance datawarehouseDesigning high performance datawarehouse
Designing high performance datawarehouseUday Kothari
 
Oracle 12.2 - My Favorite Top 5 New or Improved Features
Oracle 12.2 - My Favorite Top 5 New or Improved FeaturesOracle 12.2 - My Favorite Top 5 New or Improved Features
Oracle 12.2 - My Favorite Top 5 New or Improved FeaturesSolarWinds
 
ScaleDB Technical Presentation
ScaleDB Technical PresentationScaleDB Technical Presentation
ScaleDB Technical PresentationIvan Zoratti
 

Ähnlich wie Introduction to Columnstore Indexes (20)

The Flavors of Non-Clustered Indexes
The Flavors of Non-Clustered IndexesThe Flavors of Non-Clustered Indexes
The Flavors of Non-Clustered Indexes
 
Columnstore improvements in SQL Server 2016
Columnstore improvements in SQL Server 2016Columnstore improvements in SQL Server 2016
Columnstore improvements in SQL Server 2016
 
Data Warehouse approaches with Dynamics AX
Data Warehouse  approaches with Dynamics AXData Warehouse  approaches with Dynamics AX
Data Warehouse approaches with Dynamics AX
 
How Do Non-Clustered Indexes Improve Performance?
How Do Non-Clustered Indexes Improve Performance?How Do Non-Clustered Indexes Improve Performance?
How Do Non-Clustered Indexes Improve Performance?
 
Real-world BISM in SQL Server 2012 SSAS
Real-world BISM in SQL Server 2012 SSASReal-world BISM in SQL Server 2012 SSAS
Real-world BISM in SQL Server 2012 SSAS
 
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
Building and Deploying Large Scale SSRS using Lessons Learned from Customer D...
 
Oracle Database 12c - Features for Big Data
Oracle Database 12c - Features for Big DataOracle Database 12c - Features for Big Data
Oracle Database 12c - Features for Big Data
 
Le novità di sql server 2019
Le novità di sql server 2019Le novità di sql server 2019
Le novità di sql server 2019
 
Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019Modernizing your database with SQL Server 2019
Modernizing your database with SQL Server 2019
 
Clustered Columnstore Introduction
Clustered Columnstore IntroductionClustered Columnstore Introduction
Clustered Columnstore Introduction
 
Optimising Queries - Series 4 Designing Effective Indexes
Optimising Queries - Series 4 Designing Effective IndexesOptimising Queries - Series 4 Designing Effective Indexes
Optimising Queries - Series 4 Designing Effective Indexes
 
Pr dc 2015 sql server is cheaper than open source
Pr dc 2015 sql server is cheaper than open sourcePr dc 2015 sql server is cheaper than open source
Pr dc 2015 sql server is cheaper than open source
 
Configuring Sage 500 for Performance
Configuring Sage 500 for PerformanceConfiguring Sage 500 for Performance
Configuring Sage 500 for Performance
 
Introduction to Clustered Indexes and Heaps
Introduction to Clustered Indexes and HeapsIntroduction to Clustered Indexes and Heaps
Introduction to Clustered Indexes and Heaps
 
SSAS Design & Incremental Processing - PASSMN May 2010
SSAS Design & Incremental Processing - PASSMN May 2010SSAS Design & Incremental Processing - PASSMN May 2010
SSAS Design & Incremental Processing - PASSMN May 2010
 
Improve power bi performance
Improve power bi performanceImprove power bi performance
Improve power bi performance
 
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL ServerGeek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
Geek Sync I Need for Speed: In-Memory Databases in Oracle and SQL Server
 
Designing high performance datawarehouse
Designing high performance datawarehouseDesigning high performance datawarehouse
Designing high performance datawarehouse
 
Oracle 12.2 - My Favorite Top 5 New or Improved Features
Oracle 12.2 - My Favorite Top 5 New or Improved FeaturesOracle 12.2 - My Favorite Top 5 New or Improved Features
Oracle 12.2 - My Favorite Top 5 New or Improved Features
 
ScaleDB Technical Presentation
ScaleDB Technical PresentationScaleDB Technical Presentation
ScaleDB Technical Presentation
 

Mehr von Jason Strate

Accelerating Business Intelligence Solutions with Microsoft Azure pass
Accelerating Business Intelligence Solutions with Microsoft Azure   passAccelerating Business Intelligence Solutions with Microsoft Azure   pass
Accelerating Business Intelligence Solutions with Microsoft Azure passJason Strate
 
The Plan Cache Whisperer - Performance Tuning SQL Server
The Plan Cache Whisperer - Performance Tuning SQL ServerThe Plan Cache Whisperer - Performance Tuning SQL Server
The Plan Cache Whisperer - Performance Tuning SQL ServerJason Strate
 
Strategies for SQL Server Index Analysis
Strategies for SQL Server Index AnalysisStrategies for SQL Server Index Analysis
Strategies for SQL Server Index AnalysisJason Strate
 
Leveraging Cloud for the Modern SQL Developer
Leveraging Cloud for the Modern SQL DeveloperLeveraging Cloud for the Modern SQL Developer
Leveraging Cloud for the Modern SQL DeveloperJason Strate
 
Getting Started with Windows Azure and SQL Databases
Getting Started with Windows Azure and SQL DatabasesGetting Started with Windows Azure and SQL Databases
Getting Started with Windows Azure and SQL DatabasesJason Strate
 
5 SQL Server Indexing Myths
5 SQL Server Indexing Myths5 SQL Server Indexing Myths
5 SQL Server Indexing MythsJason Strate
 
Necessary Evils, Building Optimized CRUD Procedures
Necessary Evils, Building Optimized CRUD ProceduresNecessary Evils, Building Optimized CRUD Procedures
Necessary Evils, Building Optimized CRUD ProceduresJason Strate
 
Choosing Your Clustered Index
Choosing Your Clustered IndexChoosing Your Clustered Index
Choosing Your Clustered IndexJason Strate
 
BuildingSecurity Audits with Extended Events
BuildingSecurity Audits with Extended EventsBuildingSecurity Audits with Extended Events
BuildingSecurity Audits with Extended EventsJason Strate
 
5 Amazing Reasons DBAs Need to Love Extended Events
5 Amazing Reasons DBAs Need to Love Extended Events5 Amazing Reasons DBAs Need to Love Extended Events
5 Amazing Reasons DBAs Need to Love Extended EventsJason Strate
 
5 ways to improve performance through indexing
5 ways to improve performance through indexing5 ways to improve performance through indexing
5 ways to improve performance through indexingJason Strate
 
The Side Effect of NOLOCK
The Side Effect of NOLOCKThe Side Effect of NOLOCK
The Side Effect of NOLOCKJason Strate
 
Discovering the plan cache (sql sat175)
Discovering the plan cache (sql sat175)Discovering the plan cache (sql sat175)
Discovering the plan cache (sql sat175)Jason Strate
 
Introduction to SQL Server Security
Introduction to SQL Server SecurityIntroduction to SQL Server Security
Introduction to SQL Server SecurityJason Strate
 
What are you waiting for? (#SQLSat211)
What are you waiting for? (#SQLSat211)What are you waiting for? (#SQLSat211)
What are you waiting for? (#SQLSat211)Jason Strate
 
Discovering the plan cache (#SQLSat211)
Discovering the plan cache (#SQLSat211)Discovering the plan cache (#SQLSat211)
Discovering the plan cache (#SQLSat211)Jason Strate
 
Discovering the Plan Cache (#SQLSat 206)
Discovering the Plan Cache (#SQLSat 206)Discovering the Plan Cache (#SQLSat 206)
Discovering the Plan Cache (#SQLSat 206)Jason Strate
 
A Function by Any Other Name is a Function
A Function by Any Other Name is a FunctionA Function by Any Other Name is a Function
A Function by Any Other Name is a FunctionJason Strate
 
What are you waiting for
What are you waiting forWhat are you waiting for
What are you waiting forJason Strate
 

Mehr von Jason Strate (19)

Accelerating Business Intelligence Solutions with Microsoft Azure pass
Accelerating Business Intelligence Solutions with Microsoft Azure   passAccelerating Business Intelligence Solutions with Microsoft Azure   pass
Accelerating Business Intelligence Solutions with Microsoft Azure pass
 
The Plan Cache Whisperer - Performance Tuning SQL Server
The Plan Cache Whisperer - Performance Tuning SQL ServerThe Plan Cache Whisperer - Performance Tuning SQL Server
The Plan Cache Whisperer - Performance Tuning SQL Server
 
Strategies for SQL Server Index Analysis
Strategies for SQL Server Index AnalysisStrategies for SQL Server Index Analysis
Strategies for SQL Server Index Analysis
 
Leveraging Cloud for the Modern SQL Developer
Leveraging Cloud for the Modern SQL DeveloperLeveraging Cloud for the Modern SQL Developer
Leveraging Cloud for the Modern SQL Developer
 
Getting Started with Windows Azure and SQL Databases
Getting Started with Windows Azure and SQL DatabasesGetting Started with Windows Azure and SQL Databases
Getting Started with Windows Azure and SQL Databases
 
5 SQL Server Indexing Myths
5 SQL Server Indexing Myths5 SQL Server Indexing Myths
5 SQL Server Indexing Myths
 
Necessary Evils, Building Optimized CRUD Procedures
Necessary Evils, Building Optimized CRUD ProceduresNecessary Evils, Building Optimized CRUD Procedures
Necessary Evils, Building Optimized CRUD Procedures
 
Choosing Your Clustered Index
Choosing Your Clustered IndexChoosing Your Clustered Index
Choosing Your Clustered Index
 
BuildingSecurity Audits with Extended Events
BuildingSecurity Audits with Extended EventsBuildingSecurity Audits with Extended Events
BuildingSecurity Audits with Extended Events
 
5 Amazing Reasons DBAs Need to Love Extended Events
5 Amazing Reasons DBAs Need to Love Extended Events5 Amazing Reasons DBAs Need to Love Extended Events
5 Amazing Reasons DBAs Need to Love Extended Events
 
5 ways to improve performance through indexing
5 ways to improve performance through indexing5 ways to improve performance through indexing
5 ways to improve performance through indexing
 
The Side Effect of NOLOCK
The Side Effect of NOLOCKThe Side Effect of NOLOCK
The Side Effect of NOLOCK
 
Discovering the plan cache (sql sat175)
Discovering the plan cache (sql sat175)Discovering the plan cache (sql sat175)
Discovering the plan cache (sql sat175)
 
Introduction to SQL Server Security
Introduction to SQL Server SecurityIntroduction to SQL Server Security
Introduction to SQL Server Security
 
What are you waiting for? (#SQLSat211)
What are you waiting for? (#SQLSat211)What are you waiting for? (#SQLSat211)
What are you waiting for? (#SQLSat211)
 
Discovering the plan cache (#SQLSat211)
Discovering the plan cache (#SQLSat211)Discovering the plan cache (#SQLSat211)
Discovering the plan cache (#SQLSat211)
 
Discovering the Plan Cache (#SQLSat 206)
Discovering the Plan Cache (#SQLSat 206)Discovering the Plan Cache (#SQLSat 206)
Discovering the Plan Cache (#SQLSat 206)
 
A Function by Any Other Name is a Function
A Function by Any Other Name is a FunctionA Function by Any Other Name is a Function
A Function by Any Other Name is a Function
 
What are you waiting for
What are you waiting forWhat are you waiting for
What are you waiting for
 

Kürzlich hochgeladen

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Kürzlich hochgeladen (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

Introduction to Columnstore Indexes

  • 2. Jason Strate e: jstrate@pragmaticworks.com e: jasonstrate@gmail.com b: www.jasonstrate.com t: StrateSQL Resources jasonstrate.com/go/indexing Introduction MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 3. MAKING BUSINESS INTELLIGENT www.pragmaticworks.com • Industry leaders in Microsoft BI and SQL Server Platform • SQL Server Professionals - PASS Board of Directors, Speakers, Authors and MVP’s • National Sales Team Divided by Microsoft Territories • National System Integrator (NSI) • Gold Certified in Business Intelligence and Data Platform • Platform Modernization/Safe Passage • Premier Partner for PDW SI Partner Program MS PDW Partner of Year FY13 Frontline Partnership Partner of the Year for Big Data Executive sponsor - Andy Mouacdie, WW sales director PDW • Over 7,200 customers worldwide • Over 186,000 people in PW database for demand generation About Pragmatic Works
  • 6. We need to change what we do
  • 8. Agenda Introduction Columnstore Basics SQL Server Columnstore Non-Clustered Columnstore Clustered Columnstore Summary
  • 9. Agenda Introduction Columnstore Basics SQL Server Columnstore Non-Clustered Columnstore Clustered Columnstore Summary
  • 10. Session Goals • Identify differences between rowstore and columnstore indexes • Describe implementation of columnstore index in SQL Server • Define pros and cons with columnstore indexes • Demonstrate use of columnstore indexes MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 11. Agenda Introduction Columnstore Basics SQL Server Columnstore Non-Clustered Columnstore Clustered Columnstore Summary
  • 12. Index Problems • Indexes traditionally are row-based – All columns for row stored together • Any column read brings over all columns – Impacts IO, CPU, and memory – Typically 15% of DW columns in queries • Databases growing 10x every 5 years • Tuning for over indexing, under indexing, and bookmark lookups MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 13. Columnstore Basics • Change data storage from row to column based – Rowstores – Columnstores • Data grouped by columns – One column per grouping (segment) – Data access at columns level – Only return columns required for query MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 15. Traditional Index MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 16. Columnstore Index MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 17. Columnstore Index MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 18. Why Columnstore? • Improved query performance – Column centric reads – Heavy data compression – Processing by batch versus row • Improved resource utilization – Smaller index space – Less memory required MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 19. Agenda Introduction Columnstore Basics SQL Server Columnstore Non-Clustered Columnstore Clustered Columnstore Summary
  • 20. SQL Server Columnstore • Introduced to improve data warehouse performance • Available since SQL Server 2012 • SQL Server 2012 – Non-clustered columnstore • SQL Server 2014 – Clustered columnstore MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 21. Columnstore Attributes • Introduced in SQL Server 2012 • Supports batch mode processing • SQL Server 2012 – Non-clustered columnstore – No key columns – Support partitioning – Read only index • SQL Server 2014 – Clustered columnstore – Columnstore archive format – Readwrite when clustered MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 22. Batch-mode Processing MAKING BUSINESS INTELLIGENT www.pragmaticworks.com 1 record versus 415 records
  • 23. Columnstore Restrictions • 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 created with the INCLUDE keyword • Cannot include the ASC or DESC keywords for sorting the index • No seek operations • Cannot contain a column with a FILESTREAM attribute • Limited data types – Except varchar(max), nvarchar(max), binary, varbinary, ntext, text, image, uniqueidentifier, rowversion, timestamp, sqlvariant, xml, CLR types • Feature restrictions – Replication – Change tracking – Change data capture – Filestream MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 24. Agenda Introduction Columnstore Basics SQL Server Columnstore Non-Clustered Columnstore Clustered Columnstore Summary
  • 25. Non-Clustered Columnstore • Available in: – SQL Server 2012 – SQL Server 2012 Parallel Data Warehouse – SQL Server 2014 • One non-clustered columnstore per table – Support tables heap or clustered index • Add in all columns from table – No key columns • Best support star-join style queries • Avoid OUTER JOIN and NOT IN – Prevent batch processing MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 26. Updating Non-Clustered Columnstore • Drop the columnstore • Perform DML • Recreate columnstore Drop and Rebuild • Create new partition with modified data • Create columnstore • Switch in partition Partition Switch • Apply changes to separate table • UNION ALL columnstore or change table • Manage DML through trigger Partitioned View MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 27. NON-CLUSTERED COLUMNSTORE Demo MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 28. Agenda Introduction Columnstore Basics SQL Server Columnstore Non-Clustered Columnstore Clustered Columnstore Summary
  • 29. Clustered Columnstore • Available in: – SQL Server 2012 Parallel Data Warehouse – SQL Server 2014 • One clustered columnstore per table – Is primary storage for data – Reduces space requirements • Can leverage columnstore archive format • Same design patterns as non-clustered • Preferred over non-clustered columnstore MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 30. CLUSTERED COLUMNSTORE Demo MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 31. Agenda Introduction Columnstore Basics SQL Server Columnstore Non-Clustered Columnstore Clustered Columnstore Summary
  • 32. Summary • Columnstore indexes change data can be accessed • Provides increased data compression • Retrieves only the columns that are needed • Primary benefit in data warehouses – Slowly or unchanging data MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 33. More Information Expert Performance Indexing For SQL Server 2012 Jason Strate Ted Krueger Overview Statistics Maintenance Tools Analysis http://amzn.com/1430237414 MAKING BUSINESS INTELLIGENT www.pragmaticworks.com
  • 34. Services Speed development through training, and rapid development services from Pragmatic Works. Products BI products to covert to a Microsoft BI platform and simplify development on the platform. Foundation Helping those who do not have the means to get into information technology achieve their dreams. For more information… Name: Jason Strate Email: jstrate@pragmaticworks.com Blog: www.jasonstrate.com Resource: jasonstrate.com/go/indexing Need Help? jasonstrate.com/go/vmdba