SlideShare a Scribd company logo
Columnstore Indexes
Deep introduction into columnar storage and
indexes in SQL Server 2012

Denis Reznik
Sponsors
About me






3 |

Denis Reznik
Kiev, Ukraine
Database Architect at The Frayman Group
Microsoft MVP
Community enthusiast
Agenda





Columnar storage
Creation of Columnstore index
Usage scenarios and limitations
Performance accelerators
 Columnstore Storage internals
 Columnstore Execution mode internals

 Columnstore index maintenance
 Columnstore Future (actually Present :)
4 |
Row Store and Column Store

 In row store, data is stored tuple by tuple.
 In column store, data is stored column by
column
Row Store and Column Store


Most of the queries does not process all the attributes of a particular
relation.
nam address
e
id

SELECT c.Name, c.Address
FROM Customers c
WHERE c.City = 'Sofia'

city

state

age
Creating a columnstore index

T-SQL

SSMS
Usage scenarios and limitations
 Primary focus of Columnstore Indexes is DW
databases
 In SQL Server 2012 Columnstore Indexes
are read-only
 Supported operators and data types are
limited
DEMO
 Incredible Performance of Columnstore
Indexes
How Are These Performance Gains
Achieved?
 Two complimentary technologies:
 Storage
 Data is stored in a compressed columnar data format (stored
by column) instead of row store format (stored by row).

 New “batch mode” execution
 Vector-based query execution capability
 Data can then be processed in batches versus row-by-row
 Depending on filtering and other factors, a query may also
benefit by “segment elimination” - bypassing million row
chunks (segments) of data, further reducing I/O
Compression
 Patented VERTIPAQ algorithms
 So, there is no public information about how the
data actually compressed

 But some info we have 





Dictionary encoding
Run Length encoding
Bit-Vector encoding
…
DEMO
 Columnstore Indexes Internals
Columnar storage structure

Row store:

…
C1

Column store:

C2

C3

C4

C5

C6

Pages
Column Segments and Dictionaries
segment 1

C1

C2

C3

C4

C5

C6

Set of
about 1M
rows

…
segment N

Column
Segment

dictionaries
DEMO
 Columnstore Indexes – Segments and
Dictionaries
Memory management
• Memory management is automatic
• Columnstore is persisted on disk
• Needed columns fetched into memory
• Columnstore segments is a unit of data between disk and memory

T.C
T.C
T.C T.C
4
1
3
T.C 2
T.C
1
T.C
T.C
T.C T.C 3
4
1
3
T.C 2
T.C
1
T.C
T.C 3
T.C
T.C 3
1
4
2

SELECT C2, SUM(C4)
FROM T
GROUP BY C2;
T.C
2
T.C
2

T.C
4

T.C
4
Batch mode processing
Batch object

bitmap of qualifying rows

Column vectors

 Process ~1000 rows at a
time
 Vector operators
implemented
 Greatly reduced CPU time
(7 to 40X)
Segment Elimination
• Segment (rowgroup) = 1 million row chunk
• Min, Max kept for each column in a segment
• Scans can skip segments based on this info
column_i
d

segment_i
d

min_data_i
d

max_data_id

1

1

20120101

20120131

1

2

20120115

20120215

1

3

20120201

20120228

skipped
select Date, count(*)
from dbo.Purchase
where Date >= '20120201'
group by Date
DEMO
 Segment Elimination
Maintaining Data in a Columnstore Index
 Once built, the table becomes “read-only”
and INSERT/UPDATE/DELETE/MERGE is
no longer allowed
 ALTER INDEX REBUILD / REORGANIZE not
allowed
 How can I modify index data?
 Drop columnstore index / make modifications /
add columnstore index
 UNION ALL (but be sure to validate performance)
 Partition switches (IN and OUT)
Columnstore Index Future
 Actually it is already become 
 Columnstore indexes can be clustered (in
SQL server 2014)
 Clustered Columnstore indexes can be
updatable (in SQL Server 2014)
 Update data (deltas) store in rowstore until
segment can be created
Summary






Columnar storage
Columnstore Performance Demo
Creation of Columnstore index
Usage scenarios and limitations
Performance accelerators
 Columnstore Storage internals
 Columnstore Execution mode internals

 Columnstore index maintanance
 Columnstore Future (actually Present :)
22 |
Sponsors
Thank you!
 Denis Reznik






Twitter: @denisreznik
Email: denisreznik@live.ru
Blog (in russian): http://reznik.uneta.com.ua
Facebook: https://www.facebook.com/denis.reznik.5
LinkedIn: http://ua.linkedin.com/pub/denis-reznik/3/502/234

More Related Content

What's hot

Editors l21 l24
Editors l21 l24Editors l21 l24
Editors l21 l24
Neha Pachauri
 
MySql
MySqlMySql
Using Spectrum on Demand from MapInfo Pro
Using Spectrum on Demand from MapInfo ProUsing Spectrum on Demand from MapInfo Pro
Using Spectrum on Demand from MapInfo Pro
Peter Horsbøll Møller
 
Pandas
PandasPandas
Pandas
Jyoti shukla
 
Python and CSV Connectivity
Python and CSV ConnectivityPython and CSV Connectivity
Python and CSV Connectivity
Neeru Mittal
 
MapInfo Professional 12.0 and SQL Server 2008
MapInfo Professional 12.0 and SQL Server 2008MapInfo Professional 12.0 and SQL Server 2008
MapInfo Professional 12.0 and SQL Server 2008
Peter Horsbøll Møller
 

What's hot (6)

Editors l21 l24
Editors l21 l24Editors l21 l24
Editors l21 l24
 
MySql
MySqlMySql
MySql
 
Using Spectrum on Demand from MapInfo Pro
Using Spectrum on Demand from MapInfo ProUsing Spectrum on Demand from MapInfo Pro
Using Spectrum on Demand from MapInfo Pro
 
Pandas
PandasPandas
Pandas
 
Python and CSV Connectivity
Python and CSV ConnectivityPython and CSV Connectivity
Python and CSV Connectivity
 
MapInfo Professional 12.0 and SQL Server 2008
MapInfo Professional 12.0 and SQL Server 2008MapInfo Professional 12.0 and SQL Server 2008
MapInfo Professional 12.0 and SQL Server 2008
 

Similar to SqlSaturday199 - Columnstore Indexes

AWS (Amazon Redshift) presentation
AWS (Amazon Redshift) presentationAWS (Amazon Redshift) presentation
AWS (Amazon Redshift) presentation
Volodymyr Rovetskiy
 
An introduction to column store indexes and batch mode
An introduction to column store indexes and batch modeAn introduction to column store indexes and batch mode
An introduction to column store indexes and batch mode
Chris Adkin
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStore
MariaDB plc
 
In memory databases presentation
In memory databases presentationIn memory databases presentation
In memory databases presentation
Michael Keane
 
Best practices for Data warehousing with Amazon Redshift - AWS PS Summit Canb...
Best practices for Data warehousing with Amazon Redshift - AWS PS Summit Canb...Best practices for Data warehousing with Amazon Redshift - AWS PS Summit Canb...
Best practices for Data warehousing with Amazon Redshift - AWS PS Summit Canb...
Amazon Web Services
 
Best Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon RedshiftBest Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon Redshift
Amazon Web Services
 
Oracle Database InMemory
Oracle Database InMemoryOracle Database InMemory
Oracle Database InMemory
Jorge Barba
 
Dremel interactive analysis of web scale datasets
Dremel interactive analysis of web scale datasetsDremel interactive analysis of web scale datasets
Dremel interactive analysis of web scale datasets
Carl Lu
 
Columnstore indexes in sql server 2014
Columnstore indexes in sql server 2014Columnstore indexes in sql server 2014
Columnstore indexes in sql server 2014
Antonios Chatzipavlis
 
Best Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon Redshift Best Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon Redshift
Amazon Web Services
 
Best Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon RedshiftBest Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon Redshift
Amazon Web Services
 
AWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
AWS June 2016 Webinar Series - Amazon Redshift or Big Data AnalyticsAWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
AWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
Amazon Web Services
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStore
MariaDB plc
 
C-Store-s553-stonebraker.ppt
C-Store-s553-stonebraker.pptC-Store-s553-stonebraker.ppt
C-Store-s553-stonebraker.ppt
JinwenZhong1
 
Anything SQL: Lightning Talks
Anything SQL: Lightning TalksAnything SQL: Lightning Talks
Anything SQL: Lightning Talks
SQL Server Sri Lanka User Group
 
[db tech showcase OSS 2017] A23: Analytics with MariaDB ColumnStore by MariaD...
[db tech showcase OSS 2017] A23: Analytics with MariaDB ColumnStore by MariaD...[db tech showcase OSS 2017] A23: Analytics with MariaDB ColumnStore by MariaD...
[db tech showcase OSS 2017] A23: Analytics with MariaDB ColumnStore by MariaD...
Insight Technology, Inc.
 
[db tech showcase OSS 2017] A25: Replacing Oracle Database at DBS Bank by Mar...
[db tech showcase OSS 2017] A25: Replacing Oracle Database at DBS Bank by Mar...[db tech showcase OSS 2017] A25: Replacing Oracle Database at DBS Bank by Mar...
[db tech showcase OSS 2017] A25: Replacing Oracle Database at DBS Bank by Mar...
Insight Technology, Inc.
 
CS636-olap.ppt
CS636-olap.pptCS636-olap.ppt
CS636-olap.ppt
Iftikharbaig7
 
Data Warehousing with Amazon Redshift
Data Warehousing with Amazon RedshiftData Warehousing with Amazon Redshift
Data Warehousing with Amazon Redshift
Amazon Web Services
 
Cassandra Basics, Counters and Time Series Modeling
Cassandra Basics, Counters and Time Series ModelingCassandra Basics, Counters and Time Series Modeling
Cassandra Basics, Counters and Time Series Modeling
Vassilis Bekiaris
 

Similar to SqlSaturday199 - Columnstore Indexes (20)

AWS (Amazon Redshift) presentation
AWS (Amazon Redshift) presentationAWS (Amazon Redshift) presentation
AWS (Amazon Redshift) presentation
 
An introduction to column store indexes and batch mode
An introduction to column store indexes and batch modeAn introduction to column store indexes and batch mode
An introduction to column store indexes and batch mode
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStore
 
In memory databases presentation
In memory databases presentationIn memory databases presentation
In memory databases presentation
 
Best practices for Data warehousing with Amazon Redshift - AWS PS Summit Canb...
Best practices for Data warehousing with Amazon Redshift - AWS PS Summit Canb...Best practices for Data warehousing with Amazon Redshift - AWS PS Summit Canb...
Best practices for Data warehousing with Amazon Redshift - AWS PS Summit Canb...
 
Best Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon RedshiftBest Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon Redshift
 
Oracle Database InMemory
Oracle Database InMemoryOracle Database InMemory
Oracle Database InMemory
 
Dremel interactive analysis of web scale datasets
Dremel interactive analysis of web scale datasetsDremel interactive analysis of web scale datasets
Dremel interactive analysis of web scale datasets
 
Columnstore indexes in sql server 2014
Columnstore indexes in sql server 2014Columnstore indexes in sql server 2014
Columnstore indexes in sql server 2014
 
Best Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon Redshift Best Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon Redshift
 
Best Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon RedshiftBest Practices for Migrating your Data Warehouse to Amazon Redshift
Best Practices for Migrating your Data Warehouse to Amazon Redshift
 
AWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
AWS June 2016 Webinar Series - Amazon Redshift or Big Data AnalyticsAWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
AWS June 2016 Webinar Series - Amazon Redshift or Big Data Analytics
 
MariaDB ColumnStore
MariaDB ColumnStoreMariaDB ColumnStore
MariaDB ColumnStore
 
C-Store-s553-stonebraker.ppt
C-Store-s553-stonebraker.pptC-Store-s553-stonebraker.ppt
C-Store-s553-stonebraker.ppt
 
Anything SQL: Lightning Talks
Anything SQL: Lightning TalksAnything SQL: Lightning Talks
Anything SQL: Lightning Talks
 
[db tech showcase OSS 2017] A23: Analytics with MariaDB ColumnStore by MariaD...
[db tech showcase OSS 2017] A23: Analytics with MariaDB ColumnStore by MariaD...[db tech showcase OSS 2017] A23: Analytics with MariaDB ColumnStore by MariaD...
[db tech showcase OSS 2017] A23: Analytics with MariaDB ColumnStore by MariaD...
 
[db tech showcase OSS 2017] A25: Replacing Oracle Database at DBS Bank by Mar...
[db tech showcase OSS 2017] A25: Replacing Oracle Database at DBS Bank by Mar...[db tech showcase OSS 2017] A25: Replacing Oracle Database at DBS Bank by Mar...
[db tech showcase OSS 2017] A25: Replacing Oracle Database at DBS Bank by Mar...
 
CS636-olap.ppt
CS636-olap.pptCS636-olap.ppt
CS636-olap.ppt
 
Data Warehousing with Amazon Redshift
Data Warehousing with Amazon RedshiftData Warehousing with Amazon Redshift
Data Warehousing with Amazon Redshift
 
Cassandra Basics, Counters and Time Series Modeling
Cassandra Basics, Counters and Time Series ModelingCassandra Basics, Counters and Time Series Modeling
Cassandra Basics, Counters and Time Series Modeling
 

More from Денис Резник

iForum 2015: SQL vs. NoSQL
iForum 2015: SQL vs. NoSQLiForum 2015: SQL vs. NoSQL
iForum 2015: SQL vs. NoSQL
Денис Резник
 
MS DevDay - SQLServer 2014 for Developers
MS DevDay - SQLServer 2014 for DevelopersMS DevDay - SQLServer 2014 for Developers
MS DevDay - SQLServer 2014 for Developers
Денис Резник
 
SqlSaturday199 - Deadlocks
SqlSaturday199 - DeadlocksSqlSaturday199 - Deadlocks
SqlSaturday199 - Deadlocks
Денис Резник
 
SQL Server 2012 Deep Dive (rus)
SQL Server 2012 Deep Dive (rus)SQL Server 2012 Deep Dive (rus)
SQL Server 2012 Deep Dive (rus)
Денис Резник
 
TechEd 2012 - Сценарии хранения и обработки данных в windows azure
TechEd 2012 - Сценарии хранения и обработки данных в windows azureTechEd 2012 - Сценарии хранения и обработки данных в windows azure
TechEd 2012 - Сценарии хранения и обработки данных в windows azure
Денис Резник
 
MS Swit 2012 - Windows 8 Application Lifecycle
MS Swit 2012 - Windows 8 Application LifecycleMS Swit 2012 - Windows 8 Application Lifecycle
MS Swit 2012 - Windows 8 Application Lifecycle
Денис Резник
 
MS Swit 2012 - SQL Server 2012
MS Swit 2012 - SQL Server 2012MS Swit 2012 - SQL Server 2012
MS Swit 2012 - SQL Server 2012
Денис Резник
 
Масштабирование в SQL Azure - SQL Azure Federations
Масштабирование в SQL Azure - SQL Azure FederationsМасштабирование в SQL Azure - SQL Azure Federations
Масштабирование в SQL Azure - SQL Azure Federations
Денис Резник
 
Масштабирование в SQL Azure - SQL Azure Federations
Масштабирование в SQL Azure - SQL Azure FederationsМасштабирование в SQL Azure - SQL Azure Federations
Масштабирование в SQL Azure - SQL Azure Federations
Денис Резник
 
начинаем работать с Sql server compact
начинаем работать с Sql server compactначинаем работать с Sql server compact
начинаем работать с Sql server compactДенис Резник
 
масштабирование в Sql azure
масштабирование в Sql azureмасштабирование в Sql azure
масштабирование в Sql azure
Денис Резник
 
SQL Server StreamIinsight - data processing in real time
SQL Server StreamIinsight - data processing in real timeSQL Server StreamIinsight - data processing in real time
SQL Server StreamIinsight - data processing in real timeДенис Резник
 

More from Денис Резник (19)

iForum 2015: SQL vs. NoSQL
iForum 2015: SQL vs. NoSQLiForum 2015: SQL vs. NoSQL
iForum 2015: SQL vs. NoSQL
 
MS DevDay - SQLServer 2014 for Developers
MS DevDay - SQLServer 2014 for DevelopersMS DevDay - SQLServer 2014 for Developers
MS DevDay - SQLServer 2014 for Developers
 
SqlSaturday199 - Deadlocks
SqlSaturday199 - DeadlocksSqlSaturday199 - Deadlocks
SqlSaturday199 - Deadlocks
 
SQL Server 2012 Deep Dive (rus)
SQL Server 2012 Deep Dive (rus)SQL Server 2012 Deep Dive (rus)
SQL Server 2012 Deep Dive (rus)
 
24 hop - Deadlocks
24 hop - Deadlocks24 hop - Deadlocks
24 hop - Deadlocks
 
TechEd 2012 - Сценарии хранения и обработки данных в windows azure
TechEd 2012 - Сценарии хранения и обработки данных в windows azureTechEd 2012 - Сценарии хранения и обработки данных в windows azure
TechEd 2012 - Сценарии хранения и обработки данных в windows azure
 
MS Swit 2012 - Windows 8 Application Lifecycle
MS Swit 2012 - Windows 8 Application LifecycleMS Swit 2012 - Windows 8 Application Lifecycle
MS Swit 2012 - Windows 8 Application Lifecycle
 
MS Swit 2012 - SQL Server 2012
MS Swit 2012 - SQL Server 2012MS Swit 2012 - SQL Server 2012
MS Swit 2012 - SQL Server 2012
 
Масштабирование в SQL Azure - SQL Azure Federations
Масштабирование в SQL Azure - SQL Azure FederationsМасштабирование в SQL Azure - SQL Azure Federations
Масштабирование в SQL Azure - SQL Azure Federations
 
Масштабирование в SQL Azure - SQL Azure Federations
Масштабирование в SQL Azure - SQL Azure FederationsМасштабирование в SQL Azure - SQL Azure Federations
Масштабирование в SQL Azure - SQL Azure Federations
 
SQL Server Denali
SQL Server DenaliSQL Server Denali
SQL Server Denali
 
Sql azure и все, все, все...
Sql azure и все, все, все...Sql azure и все, все, все...
Sql azure и все, все, все...
 
начинаем работать с Sql server compact
начинаем работать с Sql server compactначинаем работать с Sql server compact
начинаем работать с Sql server compact
 
Sql server 2011
Sql server 2011Sql server 2011
Sql server 2011
 
MS Swit 2010
MS Swit 2010MS Swit 2010
MS Swit 2010
 
масштабирование в Sql azure
масштабирование в Sql azureмасштабирование в Sql azure
масштабирование в Sql azure
 
WebMatrix
WebMatrixWebMatrix
WebMatrix
 
ASP.NET MVC 3
ASP.NET MVC 3ASP.NET MVC 3
ASP.NET MVC 3
 
SQL Server StreamIinsight - data processing in real time
SQL Server StreamIinsight - data processing in real timeSQL Server StreamIinsight - data processing in real time
SQL Server StreamIinsight - data processing in real time
 

Recently uploaded

Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Jeffrey Haguewood
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
Shinana2
 

Recently uploaded (20)

Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
dbms calicut university B. sc Cs 4th sem.pdf
dbms  calicut university B. sc Cs 4th sem.pdfdbms  calicut university B. sc Cs 4th sem.pdf
dbms calicut university B. sc Cs 4th sem.pdf
 

SqlSaturday199 - Columnstore Indexes

  • 1. Columnstore Indexes Deep introduction into columnar storage and indexes in SQL Server 2012 Denis Reznik
  • 3. About me      3 | Denis Reznik Kiev, Ukraine Database Architect at The Frayman Group Microsoft MVP Community enthusiast
  • 4. Agenda     Columnar storage Creation of Columnstore index Usage scenarios and limitations Performance accelerators  Columnstore Storage internals  Columnstore Execution mode internals  Columnstore index maintenance  Columnstore Future (actually Present :) 4 |
  • 5. Row Store and Column Store  In row store, data is stored tuple by tuple.  In column store, data is stored column by column
  • 6. Row Store and Column Store  Most of the queries does not process all the attributes of a particular relation. nam address e id SELECT c.Name, c.Address FROM Customers c WHERE c.City = 'Sofia' city state age
  • 7. Creating a columnstore index T-SQL SSMS
  • 8. Usage scenarios and limitations  Primary focus of Columnstore Indexes is DW databases  In SQL Server 2012 Columnstore Indexes are read-only  Supported operators and data types are limited
  • 9. DEMO  Incredible Performance of Columnstore Indexes
  • 10. How Are These Performance Gains Achieved?  Two complimentary technologies:  Storage  Data is stored in a compressed columnar data format (stored by column) instead of row store format (stored by row).  New “batch mode” execution  Vector-based query execution capability  Data can then be processed in batches versus row-by-row  Depending on filtering and other factors, a query may also benefit by “segment elimination” - bypassing million row chunks (segments) of data, further reducing I/O
  • 11. Compression  Patented VERTIPAQ algorithms  So, there is no public information about how the data actually compressed  But some info we have      Dictionary encoding Run Length encoding Bit-Vector encoding …
  • 13. Columnar storage structure Row store: … C1 Column store: C2 C3 C4 C5 C6 Pages
  • 14. Column Segments and Dictionaries segment 1 C1 C2 C3 C4 C5 C6 Set of about 1M rows … segment N Column Segment dictionaries
  • 15. DEMO  Columnstore Indexes – Segments and Dictionaries
  • 16. Memory management • Memory management is automatic • Columnstore is persisted on disk • Needed columns fetched into memory • Columnstore segments is a unit of data between disk and memory T.C T.C T.C T.C 4 1 3 T.C 2 T.C 1 T.C T.C T.C T.C 3 4 1 3 T.C 2 T.C 1 T.C T.C 3 T.C T.C 3 1 4 2 SELECT C2, SUM(C4) FROM T GROUP BY C2; T.C 2 T.C 2 T.C 4 T.C 4
  • 17. Batch mode processing Batch object bitmap of qualifying rows Column vectors  Process ~1000 rows at a time  Vector operators implemented  Greatly reduced CPU time (7 to 40X)
  • 18. Segment Elimination • Segment (rowgroup) = 1 million row chunk • Min, Max kept for each column in a segment • Scans can skip segments based on this info column_i d segment_i d min_data_i d max_data_id 1 1 20120101 20120131 1 2 20120115 20120215 1 3 20120201 20120228 skipped select Date, count(*) from dbo.Purchase where Date >= '20120201' group by Date
  • 20. Maintaining Data in a Columnstore Index  Once built, the table becomes “read-only” and INSERT/UPDATE/DELETE/MERGE is no longer allowed  ALTER INDEX REBUILD / REORGANIZE not allowed  How can I modify index data?  Drop columnstore index / make modifications / add columnstore index  UNION ALL (but be sure to validate performance)  Partition switches (IN and OUT)
  • 21. Columnstore Index Future  Actually it is already become   Columnstore indexes can be clustered (in SQL server 2014)  Clustered Columnstore indexes can be updatable (in SQL Server 2014)  Update data (deltas) store in rowstore until segment can be created
  • 22. Summary      Columnar storage Columnstore Performance Demo Creation of Columnstore index Usage scenarios and limitations Performance accelerators  Columnstore Storage internals  Columnstore Execution mode internals  Columnstore index maintanance  Columnstore Future (actually Present :) 22 |
  • 24. Thank you!  Denis Reznik      Twitter: @denisreznik Email: denisreznik@live.ru Blog (in russian): http://reznik.uneta.com.ua Facebook: https://www.facebook.com/denis.reznik.5 LinkedIn: http://ua.linkedin.com/pub/denis-reznik/3/502/234