SlideShare a Scribd company logo
Columnstore
Improvements
in SQL Server 2016
Niko Neugebauer, OH22
Please silence
cell phones
Explore Everything PASS Has to Offer
FREE ONLINE WEBINAR EVENTS FREE 1-DAY LOCAL TRAINING EVENTS
LOCAL USER GROUPS
AROUND THE WORLD
ONLINE SPECIAL INTEREST
USER GROUPS
BUSINESS ANALYTICS TRAINING
VOLUNTEERING OPPORTUNITIES
PASS COMMUNITY NEWSLETTER
BA INSIGHTS NEWSLETTERFREE ONLINE RESOURCES
Session Evaluations
ways to access
Go to passSummit.com Download the GuideBook App
and search: PASS Summit 2016
Follow the QR code link displayed
on session signage throughout the
conference venue and in the
program guide
Submit by 5pm
Friday November 6th to
WIN prizes
Your feedback is
important and valuable. 3
Niko Neugebauer
Consultant, OH22
• Microsoft Data Platform Professional
• OH22 (http://www.oh22.net)
• Data Platform MVP
• Founder of a couple of Portuguese PASS Chapters
• Creator of CISL – Free & Open Source
Columnstore Indexes Script Library
(https://github.com/NikoNeugebauer/CISL)
Place your
photo here
/WebCaravela @NikoNeugebauer www.nikoport.com
Our Today’s Columnstore Agenda p. 1
• HTAP aka Operational Analytics
• Data Warehousing (CCI)
• T-SQL
• High Availability
• Batch Mode Changes
• Data Loading (+Minimal Logging)
• Performance (Batch, SSIS)
Our Today’s Columnstore Agenda p. 2
• Memory Managment
• Change Tracking
• Maintenance
• Monitoring Improvements (DMV, Extended Events, Performance Counters)
• Configuration Improvement (Test it!)
• Indexed Views
• New Trace Flags
• Upcoming Attraction 
HTAP
Hybrid Transactional
/Analytical Processing
Analytics
Operational
What is it all about:
• Predictive Analytics, Prescriptive Analytics, Business
Analytics, Machine Learning, Data Mining
But technically it all goes down to the mining 
one thing we treasure quite a lot: the Data
Analytics
Analytics – is the process of discovery & communication
of meaningful patterns in data.
Reporting - extraction of the aggregated information for
further analysis.
Querying - data extraction process
Analytics Faces
Traditional Operational/Analytics
architecture
Key issues
Complex implementation
Requires two servers (capital
expenditures and operational expenditures)
Data latency in analytics
More businesses demand;
requires real-time analytics
IIS Server
BI analysts
• Costs
• Integration Problems (data types, constraints, network
problems, etc)
• Delay for getting the actual data
Traditional Operational Analytics
Problems:
Nothing substitutes analytics queries performance,
possible using schemas customized (Star/Snowflake) and/or
pre-aggregated cubes
Modern Operational Analytics notes:
Minimizing data latency for analytics
Benefits
No data latency
No ETL
No separate data warehouse
Challenges
Analytics queries are resource intensive and
can cause blocking
Minimizing impact on operational workloads
Sub-optimal execution of analytics on
relational schema
IIS Server
BI analysts
Optimizing data latency for analytics
BI analysts
What is operational analytics and what does it
mean to you?
Operational analytics with disk-based tables
Operational analytics with In-Memory OLTP
IIS Server
There are now 2 types of Operational Analytics:
Operational Analytics for Disk-Based
Operational Analytics for InMemory
Operational Analytics: SQL Server 2016
Updatable Columnstore SQL Server 2014
Disk-based Operational Analytics
Operational Analytics Query Processing
Operational
Analytics
Demo
Filtered Operational Analytics
Create a filtered Nonclustered Columnstore Index!
Operational
Analytics
Demo with a Filtered Index
In-Memory Operational Analytics
In-Memory Operational Analytics
sys.sp_memory_optimized_cs_migration –
compresses data from InMemory OLTP Table into
In-Memory Columnstore
Operational
Analytics
Demo Memory-Optimized
Compression
Delay
Compression Delay
Warm Data Hot Data
Recent DataArchive Data
Compressed Row Groups Delta-Stores
The Problem:
When we move a row from Delta-Store into the
compressed Row Group, it becomes compressed.
Once it is updated, the row is marked as deleted in
the Deleted Bitmap/Deleted Buffer and the new
value is inserted in Delta-Store.
The Solution is the Compression Delay
Default delay is 0 min
alter index PK_NCCi_test_inline
on dbo.ncci_test_inline
set (COMPRESSION_DELAY = 60 Minutes);
Data
Warehouse
Clustered Columnstore
Clustered Columnstore (DWH)
Nonclustered Indexes
Primary & Foreign Keys + Unique Constraints
Nonclustered Secondary Rowstore Locking
T-SQL
Columnstore in SQL 2016
New T-SQL
• Inline Table definition of Clustered Columnstore
Index
• Inline Table definition of Nonclustered
Columnstore Index
• In-Memory OLTP & Columnstore Indexes
New T-SQL for Disk-Based Columnstore
CREATE TABLE [dbo].[FactOnlineSales_CCI](
[OnlineSalesKey] [int] NOT NULL,
[StoreKey] [int] NOT NULL,
[ProductKey] [int] NOT NULL,
[PromotionKey] [int] NOT NULL,
[CurrencyKey] [int] NOT NULL,
[CustomerKey] [int] NOT NULL,
INDEX PK_FactOnlineSales_CCI CLUSTERED COLUMNSTORE
);
CREATE TABLE [dbo].[FactOnlineSales_NCCI](
[OnlineSalesKey] [int] NOT NULL,
[StoreKey] [int] NOT NULL,
[ProductKey] [int] NOT NULL,
[PromotionKey] [int] NOT NULL,
[CurrencyKey] [int] NOT NULL,
[CustomerKey] [int] NOT NULL,
INDEX PK_FactOnlineSales_CCI NONCLUSTERED COLUMNSTORE (OnlineSalesKey, CustomerKey)
);
New T-SQL for In-Memory Columnstore
CREATE TABLE [dbo].[FactOnlineSales_Hekaton](
[OnlineSalesKey] [int] NOT NULL,
[StoreKey] [int] NOT NULL,
[ProductKey] [int] NOT NULL,
[PromotionKey] [int] NOT NULL,
[CurrencyKey] [int] NOT NULL,
[CustomerKey] [int] NOT NULL,
Constraint PK_FactOnlineSales_Hekaton PRIMARY KEY NONCLUSTERED ([OnlineSalesKey]),
INDEX CCI_FactOnlineSales_Hekaton
CLUSTERED COLUMNSTORE
) WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA);
ALTER TABLE dbo. FactOnlineSales_Hekaton
ADD INDEX CCI_FactOnlineSales_Hekaton
CLUSTERED COLUMNSTORE;
HA
High Availability
High Availability
High Availability
Readable Secondaries for Availability Groups through
Snapshot &
Read Committed Snapshot
Isolation Levels support
Transactional Replication
We can now control, how the HTAP
Columnstore Indexes are being replicated –
if they should be created on the Subscriber or not.
Transactional Replication
Further Columnstore Improvements
• Data Loading Improvements
• Batch Mode
• Performance Improvements
• Change Tracking
• Maintenance Improvements
• Monitoring Improvements (DMV, Extended Events, Performance Counters)
Data Loading Improvements
• Parallel Data Loading finally enabled
• SIMD support
• Delta-Stores are not Page-Compressed!!!
• Under NCCI Delta-Stores are automatically increasing their max size with
each iteration under pressure
• Compression Delay
• SSIS
• Minimal Logging
Parallel Data Loading
SIMD Improvements
Columnstore is SIMD-aware and uses it for
different purposes, such as:
- Huffman decoding
- Predicate Pushdown
- String Hash
Delta-Stores for NCCI
- Under memory pressure the size of the created
Delta-Stores for the Nonclustered Columnstore
Indexes will be doubled for each succeeding
operation from 1048576 rows to ~2 Million
Rows, ~4 Million Rows, ... 32 Million Rows
The solution: Compression Delay
Default delay is 0 min
alter index PK_NCCi_test_inline
on dbo.ncci_test_inline
set (COMPRESSION_DELAY = 60 Minutes);
SSIS 2016 Improvements
AutoAdjustBufferSize - True
Warning: It’s not enough, you will need to set up the
maximum number of rows per buffer, otherwise
your performance will be extremely slow!
DefaultBufferMaxRows = 1048576
Minimal Logging
Minimal Logging
Memory
Improvements
Dynamic Memory Grants
Trace Flag 9389 - Enables dynamic memory grant
for batch mode operators.
Memory Grant Memory Required Dynamic Memory Grant
Batch Mode
Improvements
Batch Mode Improvements
• Batch Mode support for 1 core execution plan operators
• Batch Mode support for the Sort operator
• Batch Mode support for the Multiple Distinct Count
operations
• Batch Mode support for the Left Anti-Semi Join operators
Batch Sorting Improvements
Trace Flag Description
9347 Disables batch mode sort operator
9349 Disables batch mode top sort operator
9358
Disable batch mode sort operations in a complex parallel query in SQL
Server 2016
Batch Mode
Demo
Batch Mode for Windowing Functions
Window
Batch Mode
Demo
Further Batch Improvements
• Simple Aggregate Predicate Pushdown
• Local Aggregation
• String Predicate Pushdown for Index Scan operator in
Batch Mode
Batch
Aggregation Pushdown Demo
Locally Aggregated Rows
String Predicate Pushdown
Change Tracking / CDC in SQL 2016
Columnstore Change Tracking Change Data Capture Temporal (2016+)
Clustered No No Yes
Nonclustered Yes Yes Yes
Memory-Optimized No No Yes
Maintenance Improvements
• Better ALTER INDEX … REORGANIZE
(removes deleted rows, less memory pressure)
• Self-Merging (this is when Row Group is being recompressed
eliminating obsolete row versions that are found in Deleted
Bitmap)
• Intergroup Merging (when the sum of active rows between
multiple Row Groups is less then 1048576, then their
information can be merged into a new single Row Group)
Maintenance Improvements
• Being a compressed Row Group (Delta-Stores & Tail
Row Groups are not qualified)
• A Row Group has to have at least 10% of its data being
marked as obsolete in Deleted Bitmap (for In-Memory
this threshold is set on 90%)
• – A Row Group should not being trimmed because of
the dictionary pressure.
Row Group Merging in SQL Server 2016
Columnstore Self-Merge Intergroup Merge Cleanup
Clustered Yes Yes Yes
Nonclustered Yes Yes*1 Yes
Memory-Optimized Yes*2 No Yes
New DMVs:
• sys.dm_column_store_object_pool
• sys.dm_db_column_store_row_group_physical_stats
• sys.dm_db_column_store_row_group_operational_stats
• sys.internal_partitions
Enhanced DMVs:
• sys.dm_db_index_operational_stats
• sys.dm_db_index_physical_stats
Extended Events
Extended Events Categories 2016
• Columnstore Index creation
• Batch Mode
• Tuple Mover
• Columnstore Internal Object Operations
• Columnstore Processing
• Columnstore Object Pool
• Errors
Configuration Improvement
Large Pages (Trace Flag 834)
should be supported in SQL Server 2016,
or at least the Connect Item for it is closed as fixed. 
Take them to DEV & QA Environments and let Microsoft
know the results
New Trace Flags
Trace Flag Description
9347 Disables batch mode sort operator
9349 Disables batch mode top sort operator
9358
Disable batch mode sort operations in a complex parallel query in SQL
Server 2016
9389 Enables dynamic memory grant for batch mode operators
10204 Disables merge/recompress during columnstore index reorganization
Indexed Views
SQL Server 2016 supports Indexed Views with updatable
Nonclustered Columnstore Indexes!
Resources:
My Columnstore Blogpost Series:
http://www.nikoport.com/columnstore
CISL – Open Source Columnstore Library:
https://github.com/NikoNeugebauer/CISL
Session Evaluations
ways to access
Go to passSummit.com Download the GuideBook App
and search: PASS Summit 2016
Follow the QR code link displayed
on session signage throughout the
conference venue and in the
program guide
Submit by 5pm
Friday November 6th to
WIN prizes
Your feedback is
important and valuable. 3
Thank You
Learn more from
Niko Neugebauer
n.neugebauer@oh22.net
or follow @NikoNeugebauer

More Related Content

What's hot (20)

PPTX
Scylla Summit 2018: Scylla 3.0 and Beyond
ScyllaDB
 
PPTX
What is Change Data Capture (CDC) and Why is it Important?
FlyData Inc.
 
PPTX
Oracle GoldenGate for MySQL Overview
Jinyu Wang
 
PPTX
Gs08 modernize your data platform with sql technologies wash dc
Bob Ward
 
PDF
An Introduction to Amazon’s DynamoDB
Knoldus Inc.
 
PPTX
SQL Explore 2012: P&T Part 3
sqlserver.co.il
 
PDF
Gab document db scaling database
MUG Perú
 
PDF
Scylla Summit 2022: How ScyllaDB Powers This Next Tech Cycle
ScyllaDB
 
PPT
Scaling MySQL using Fabric
Karthik .P.R
 
PDF
How MariaDB is approaching DBaaS
MariaDB plc
 
PPTX
SQL Explore 2012: P&T Part 2
sqlserver.co.il
 
PDF
Introduction to SharePoint for SQLserver DBAs
Steve Knutson
 
PDF
In-memory ColumnStore Index
SolidQ
 
PDF
The Evolution of Open Source Databases
Ivan Zoratti
 
PDF
Running Scylla on Kubernetes with Scylla Operator
ScyllaDB
 
PPTX
ClustrixDB: how distributed databases scale out
MariaDB plc
 
PDF
MySQL Query Optimization (Basics)
Karthik .P.R
 
PPTX
Ibm datastage online training in hyderabad
GoLogica Technologies
 
PDF
MongoDB and DynamoDB
Md. Minhazul Haque
 
PDF
MariaDB: Connect Storage Engine
Kangaroot
 
Scylla Summit 2018: Scylla 3.0 and Beyond
ScyllaDB
 
What is Change Data Capture (CDC) and Why is it Important?
FlyData Inc.
 
Oracle GoldenGate for MySQL Overview
Jinyu Wang
 
Gs08 modernize your data platform with sql technologies wash dc
Bob Ward
 
An Introduction to Amazon’s DynamoDB
Knoldus Inc.
 
SQL Explore 2012: P&T Part 3
sqlserver.co.il
 
Gab document db scaling database
MUG Perú
 
Scylla Summit 2022: How ScyllaDB Powers This Next Tech Cycle
ScyllaDB
 
Scaling MySQL using Fabric
Karthik .P.R
 
How MariaDB is approaching DBaaS
MariaDB plc
 
SQL Explore 2012: P&T Part 2
sqlserver.co.il
 
Introduction to SharePoint for SQLserver DBAs
Steve Knutson
 
In-memory ColumnStore Index
SolidQ
 
The Evolution of Open Source Databases
Ivan Zoratti
 
Running Scylla on Kubernetes with Scylla Operator
ScyllaDB
 
ClustrixDB: how distributed databases scale out
MariaDB plc
 
MySQL Query Optimization (Basics)
Karthik .P.R
 
Ibm datastage online training in hyderabad
GoLogica Technologies
 
MongoDB and DynamoDB
Md. Minhazul Haque
 
MariaDB: Connect Storage Engine
Kangaroot
 

Similar to Columnstore improvements in SQL Server 2016 (20)

PPTX
SQL server 2016 New Features
Amin Mesbahi
 
PPTX
Real Time Operational Analytics with Microsoft Sql Server 2016 [Liviu Ieran]
ITCamp
 
PDF
SQL Server 2016 novelties
MSDEVMTL
 
PPTX
Expert summit SQL Server 2016
Łukasz Grala
 
PPTX
Sql 2016 - What's New
dpcobb
 
PDF
Christian Winther Kristensen
InfinIT - Innovationsnetværket for it
 
POTX
Business Insight 2014 - Microsofts nye BI og database platform - Erling Skaal...
Microsoft
 
PPTX
SQL Server Columnstore
Tony Rogerson
 
PDF
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
Hiram Fleitas León
 
PDF
Columnstore indexes in sql server 2014
Antonios Chatzipavlis
 
PPTX
Faster transactions & analytics with the new SQL2016 In-memory technologies
Henk van der Valk
 
PPTX
SQL Server 2016 New Features and Enhancements
John Martin
 
PPT
Performance dreams of sql server 2014
Shehap Elnagar
 
PDF
Best Practices – Extreme Performance with Data Warehousing on Oracle Database
Edgar Alejandro Villegas
 
PDF
Best Practices – Extreme Performance with Data Warehousing on Oracle Databa...
Edgar Alejandro Villegas
 
PDF
Introduction to Columnstore Indexes
Jason Strate
 
PDF
Sql server 2016 new features
Ajeet Singh
 
PDF
Sql server 2016 new features
Ajeet pratap Singh
 
PPTX
Novidades do SQL Server 2016
Marcos Freccia
 
PPTX
JSSUG: SQL Sever Index Tuning
Kenichiro Nakamura
 
SQL server 2016 New Features
Amin Mesbahi
 
Real Time Operational Analytics with Microsoft Sql Server 2016 [Liviu Ieran]
ITCamp
 
SQL Server 2016 novelties
MSDEVMTL
 
Expert summit SQL Server 2016
Łukasz Grala
 
Sql 2016 - What's New
dpcobb
 
Christian Winther Kristensen
InfinIT - Innovationsnetværket for it
 
Business Insight 2014 - Microsofts nye BI og database platform - Erling Skaal...
Microsoft
 
SQL Server Columnstore
Tony Rogerson
 
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
Hiram Fleitas León
 
Columnstore indexes in sql server 2014
Antonios Chatzipavlis
 
Faster transactions & analytics with the new SQL2016 In-memory technologies
Henk van der Valk
 
SQL Server 2016 New Features and Enhancements
John Martin
 
Performance dreams of sql server 2014
Shehap Elnagar
 
Best Practices – Extreme Performance with Data Warehousing on Oracle Database
Edgar Alejandro Villegas
 
Best Practices – Extreme Performance with Data Warehousing on Oracle Databa...
Edgar Alejandro Villegas
 
Introduction to Columnstore Indexes
Jason Strate
 
Sql server 2016 new features
Ajeet Singh
 
Sql server 2016 new features
Ajeet pratap Singh
 
Novidades do SQL Server 2016
Marcos Freccia
 
JSSUG: SQL Sever Index Tuning
Kenichiro Nakamura
 
Ad

Recently uploaded (20)

DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
July Patch Tuesday
Ivanti
 
PPTX
Designing Production-Ready AI Agents
Kunal Rai
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
July Patch Tuesday
Ivanti
 
Designing Production-Ready AI Agents
Kunal Rai
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Ad

Columnstore improvements in SQL Server 2016

  • 1. Columnstore Improvements in SQL Server 2016 Niko Neugebauer, OH22
  • 3. Explore Everything PASS Has to Offer FREE ONLINE WEBINAR EVENTS FREE 1-DAY LOCAL TRAINING EVENTS LOCAL USER GROUPS AROUND THE WORLD ONLINE SPECIAL INTEREST USER GROUPS BUSINESS ANALYTICS TRAINING VOLUNTEERING OPPORTUNITIES PASS COMMUNITY NEWSLETTER BA INSIGHTS NEWSLETTERFREE ONLINE RESOURCES
  • 4. Session Evaluations ways to access Go to passSummit.com Download the GuideBook App and search: PASS Summit 2016 Follow the QR code link displayed on session signage throughout the conference venue and in the program guide Submit by 5pm Friday November 6th to WIN prizes Your feedback is important and valuable. 3
  • 5. Niko Neugebauer Consultant, OH22 • Microsoft Data Platform Professional • OH22 (http://www.oh22.net) • Data Platform MVP • Founder of a couple of Portuguese PASS Chapters • Creator of CISL – Free & Open Source Columnstore Indexes Script Library (https://github.com/NikoNeugebauer/CISL) Place your photo here /WebCaravela @NikoNeugebauer www.nikoport.com
  • 6. Our Today’s Columnstore Agenda p. 1 • HTAP aka Operational Analytics • Data Warehousing (CCI) • T-SQL • High Availability • Batch Mode Changes • Data Loading (+Minimal Logging) • Performance (Batch, SSIS)
  • 7. Our Today’s Columnstore Agenda p. 2 • Memory Managment • Change Tracking • Maintenance • Monitoring Improvements (DMV, Extended Events, Performance Counters) • Configuration Improvement (Test it!) • Indexed Views • New Trace Flags • Upcoming Attraction 
  • 10. What is it all about: • Predictive Analytics, Prescriptive Analytics, Business Analytics, Machine Learning, Data Mining But technically it all goes down to the mining  one thing we treasure quite a lot: the Data Analytics
  • 11. Analytics – is the process of discovery & communication of meaningful patterns in data. Reporting - extraction of the aggregated information for further analysis. Querying - data extraction process Analytics Faces
  • 12. Traditional Operational/Analytics architecture Key issues Complex implementation Requires two servers (capital expenditures and operational expenditures) Data latency in analytics More businesses demand; requires real-time analytics IIS Server BI analysts
  • 13. • Costs • Integration Problems (data types, constraints, network problems, etc) • Delay for getting the actual data Traditional Operational Analytics Problems:
  • 14. Nothing substitutes analytics queries performance, possible using schemas customized (Star/Snowflake) and/or pre-aggregated cubes Modern Operational Analytics notes:
  • 15. Minimizing data latency for analytics Benefits No data latency No ETL No separate data warehouse Challenges Analytics queries are resource intensive and can cause blocking Minimizing impact on operational workloads Sub-optimal execution of analytics on relational schema IIS Server BI analysts
  • 16. Optimizing data latency for analytics BI analysts What is operational analytics and what does it mean to you? Operational analytics with disk-based tables Operational analytics with In-Memory OLTP IIS Server
  • 17. There are now 2 types of Operational Analytics: Operational Analytics for Disk-Based Operational Analytics for InMemory Operational Analytics: SQL Server 2016
  • 22. Filtered Operational Analytics Create a filtered Nonclustered Columnstore Index!
  • 25. In-Memory Operational Analytics sys.sp_memory_optimized_cs_migration – compresses data from InMemory OLTP Table into In-Memory Columnstore
  • 28. Compression Delay Warm Data Hot Data Recent DataArchive Data Compressed Row Groups Delta-Stores
  • 29. The Problem: When we move a row from Delta-Store into the compressed Row Group, it becomes compressed. Once it is updated, the row is marked as deleted in the Deleted Bitmap/Deleted Buffer and the new value is inserted in Delta-Store.
  • 30. The Solution is the Compression Delay Default delay is 0 min alter index PK_NCCi_test_inline on dbo.ncci_test_inline set (COMPRESSION_DELAY = 60 Minutes);
  • 32. Clustered Columnstore (DWH) Nonclustered Indexes Primary & Foreign Keys + Unique Constraints Nonclustered Secondary Rowstore Locking
  • 34. New T-SQL • Inline Table definition of Clustered Columnstore Index • Inline Table definition of Nonclustered Columnstore Index • In-Memory OLTP & Columnstore Indexes
  • 35. New T-SQL for Disk-Based Columnstore CREATE TABLE [dbo].[FactOnlineSales_CCI]( [OnlineSalesKey] [int] NOT NULL, [StoreKey] [int] NOT NULL, [ProductKey] [int] NOT NULL, [PromotionKey] [int] NOT NULL, [CurrencyKey] [int] NOT NULL, [CustomerKey] [int] NOT NULL, INDEX PK_FactOnlineSales_CCI CLUSTERED COLUMNSTORE ); CREATE TABLE [dbo].[FactOnlineSales_NCCI]( [OnlineSalesKey] [int] NOT NULL, [StoreKey] [int] NOT NULL, [ProductKey] [int] NOT NULL, [PromotionKey] [int] NOT NULL, [CurrencyKey] [int] NOT NULL, [CustomerKey] [int] NOT NULL, INDEX PK_FactOnlineSales_CCI NONCLUSTERED COLUMNSTORE (OnlineSalesKey, CustomerKey) );
  • 36. New T-SQL for In-Memory Columnstore CREATE TABLE [dbo].[FactOnlineSales_Hekaton]( [OnlineSalesKey] [int] NOT NULL, [StoreKey] [int] NOT NULL, [ProductKey] [int] NOT NULL, [PromotionKey] [int] NOT NULL, [CurrencyKey] [int] NOT NULL, [CustomerKey] [int] NOT NULL, Constraint PK_FactOnlineSales_Hekaton PRIMARY KEY NONCLUSTERED ([OnlineSalesKey]), INDEX CCI_FactOnlineSales_Hekaton CLUSTERED COLUMNSTORE ) WITH (MEMORY_OPTIMIZED = ON, DURABILITY = SCHEMA_AND_DATA); ALTER TABLE dbo. FactOnlineSales_Hekaton ADD INDEX CCI_FactOnlineSales_Hekaton CLUSTERED COLUMNSTORE;
  • 39. High Availability Readable Secondaries for Availability Groups through Snapshot & Read Committed Snapshot Isolation Levels support
  • 40. Transactional Replication We can now control, how the HTAP Columnstore Indexes are being replicated – if they should be created on the Subscriber or not.
  • 42. Further Columnstore Improvements • Data Loading Improvements • Batch Mode • Performance Improvements • Change Tracking • Maintenance Improvements • Monitoring Improvements (DMV, Extended Events, Performance Counters)
  • 43. Data Loading Improvements • Parallel Data Loading finally enabled • SIMD support • Delta-Stores are not Page-Compressed!!! • Under NCCI Delta-Stores are automatically increasing their max size with each iteration under pressure • Compression Delay • SSIS • Minimal Logging
  • 45. SIMD Improvements Columnstore is SIMD-aware and uses it for different purposes, such as: - Huffman decoding - Predicate Pushdown - String Hash
  • 46. Delta-Stores for NCCI - Under memory pressure the size of the created Delta-Stores for the Nonclustered Columnstore Indexes will be doubled for each succeeding operation from 1048576 rows to ~2 Million Rows, ~4 Million Rows, ... 32 Million Rows
  • 47. The solution: Compression Delay Default delay is 0 min alter index PK_NCCi_test_inline on dbo.ncci_test_inline set (COMPRESSION_DELAY = 60 Minutes);
  • 48. SSIS 2016 Improvements AutoAdjustBufferSize - True Warning: It’s not enough, you will need to set up the maximum number of rows per buffer, otherwise your performance will be extremely slow! DefaultBufferMaxRows = 1048576
  • 52. Dynamic Memory Grants Trace Flag 9389 - Enables dynamic memory grant for batch mode operators. Memory Grant Memory Required Dynamic Memory Grant
  • 54. Batch Mode Improvements • Batch Mode support for 1 core execution plan operators • Batch Mode support for the Sort operator • Batch Mode support for the Multiple Distinct Count operations • Batch Mode support for the Left Anti-Semi Join operators
  • 55. Batch Sorting Improvements Trace Flag Description 9347 Disables batch mode sort operator 9349 Disables batch mode top sort operator 9358 Disable batch mode sort operations in a complex parallel query in SQL Server 2016
  • 57. Batch Mode for Windowing Functions
  • 59. Further Batch Improvements • Simple Aggregate Predicate Pushdown • Local Aggregation • String Predicate Pushdown for Index Scan operator in Batch Mode
  • 63. Change Tracking / CDC in SQL 2016 Columnstore Change Tracking Change Data Capture Temporal (2016+) Clustered No No Yes Nonclustered Yes Yes Yes Memory-Optimized No No Yes
  • 64. Maintenance Improvements • Better ALTER INDEX … REORGANIZE (removes deleted rows, less memory pressure) • Self-Merging (this is when Row Group is being recompressed eliminating obsolete row versions that are found in Deleted Bitmap) • Intergroup Merging (when the sum of active rows between multiple Row Groups is less then 1048576, then their information can be merged into a new single Row Group)
  • 65. Maintenance Improvements • Being a compressed Row Group (Delta-Stores & Tail Row Groups are not qualified) • A Row Group has to have at least 10% of its data being marked as obsolete in Deleted Bitmap (for In-Memory this threshold is set on 90%) • – A Row Group should not being trimmed because of the dictionary pressure.
  • 66. Row Group Merging in SQL Server 2016 Columnstore Self-Merge Intergroup Merge Cleanup Clustered Yes Yes Yes Nonclustered Yes Yes*1 Yes Memory-Optimized Yes*2 No Yes
  • 67. New DMVs: • sys.dm_column_store_object_pool • sys.dm_db_column_store_row_group_physical_stats • sys.dm_db_column_store_row_group_operational_stats • sys.internal_partitions
  • 70. Extended Events Categories 2016 • Columnstore Index creation • Batch Mode • Tuple Mover • Columnstore Internal Object Operations • Columnstore Processing • Columnstore Object Pool • Errors
  • 71. Configuration Improvement Large Pages (Trace Flag 834) should be supported in SQL Server 2016, or at least the Connect Item for it is closed as fixed.  Take them to DEV & QA Environments and let Microsoft know the results
  • 72. New Trace Flags Trace Flag Description 9347 Disables batch mode sort operator 9349 Disables batch mode top sort operator 9358 Disable batch mode sort operations in a complex parallel query in SQL Server 2016 9389 Enables dynamic memory grant for batch mode operators 10204 Disables merge/recompress during columnstore index reorganization
  • 73. Indexed Views SQL Server 2016 supports Indexed Views with updatable Nonclustered Columnstore Indexes!
  • 74. Resources: My Columnstore Blogpost Series: http://www.nikoport.com/columnstore CISL – Open Source Columnstore Library: https://github.com/NikoNeugebauer/CISL
  • 75. Session Evaluations ways to access Go to passSummit.com Download the GuideBook App and search: PASS Summit 2016 Follow the QR code link displayed on session signage throughout the conference venue and in the program guide Submit by 5pm Friday November 6th to WIN prizes Your feedback is important and valuable. 3
  • 76. Thank You Learn more from Niko Neugebauer [email protected] or follow @NikoNeugebauer