39

Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

  • Upload
    others

  • View
    21

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

Overview

World Record Breaking Performance (TPC-H)

SQL Server 2016 gives 40 improved

performance over SQL Server 2014

ETL

Multi-Dimensional

(MOLAP)

Tabular

(VertiPaq)

Query

ExecQuery

Exec

SSAS 2016

ETL

Query

exec

Multi-Dimensional Tabular

Direct QueryROLAP

SSAS 2016

8

Columnstore Index Why

Improved compressionData from same domain

compress better

Reduced IO

Fetch only columns needed

hellip

Data stored as rows Data stored as columns

Ideal for OLTP Efficient operation on small set of rows

C1 C2 C3 C5C4

Improved PerformanceMore data fits in memory

Optimized for CPU utilization

Ideal for DW Workload

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101107 106 01 1 6 3000

20101107 103 04 2 1 1700

20101107 109 04 2 2 2000

20101107 103 03 2 1 1700

20101107 106 05 3 4 2000

20101108 106 02 1 5 2500

20101108 102 02 1 1 1400

20101108 106 03 2 5 2500

20101108 109 01 1 1 1000

20101109 106 04 2 4 2000

20101109 106 04 2 5 2500

20101109 103 01 1 1 1700

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101107 106 01 1 6 3000

20101107 103 04 2 1 1700

20101107 109 04 2 2 2000

20101107 103 03 2 1 1700

20101107 106 05 3 4 2000

20101108 106 02 1 5 2500

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101108 102 02 1 1 1400

20101108 106 03 2 5 2500

20101108 109 01 1 1 1000

20101109 106 04 2 4 2000

20101109 106 04 2 5 2500

20101109 103 01 1 1 1700

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

Overview

Data Load

Data Loading into Columnstore Bulk Import

Dele

te b

itm

ap

Data Loading into Columnstore Staging Table

SQL 2016 Parallel Insert into Columnstore index

Dele

te b

itm

ap

Insert into ltcolumnstoregt

select from ltrowstore-staginggt

Overview

Data Load

New physical Structures

No PKFK constraints Uniqueness can be enforced through Materialized Views

BTREE (NCI)

Mapping Index(internal)

Dele

te b

itm

ap

Dele

te b

itm

ap

Overview

Data Load

New physical Structures

Query Performance

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

SELECT ProductKey SUM (SalesAmount)

FROM SalesTable

WHERE OrderDateKey lt 20101108

GROUP BY ProductKey

Column Elimination

Ro

wg

roup

Elim

inatio

n

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 2: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

World Record Breaking Performance (TPC-H)

SQL Server 2016 gives 40 improved

performance over SQL Server 2014

ETL

Multi-Dimensional

(MOLAP)

Tabular

(VertiPaq)

Query

ExecQuery

Exec

SSAS 2016

ETL

Query

exec

Multi-Dimensional Tabular

Direct QueryROLAP

SSAS 2016

8

Columnstore Index Why

Improved compressionData from same domain

compress better

Reduced IO

Fetch only columns needed

hellip

Data stored as rows Data stored as columns

Ideal for OLTP Efficient operation on small set of rows

C1 C2 C3 C5C4

Improved PerformanceMore data fits in memory

Optimized for CPU utilization

Ideal for DW Workload

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101107 106 01 1 6 3000

20101107 103 04 2 1 1700

20101107 109 04 2 2 2000

20101107 103 03 2 1 1700

20101107 106 05 3 4 2000

20101108 106 02 1 5 2500

20101108 102 02 1 1 1400

20101108 106 03 2 5 2500

20101108 109 01 1 1 1000

20101109 106 04 2 4 2000

20101109 106 04 2 5 2500

20101109 103 01 1 1 1700

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101107 106 01 1 6 3000

20101107 103 04 2 1 1700

20101107 109 04 2 2 2000

20101107 103 03 2 1 1700

20101107 106 05 3 4 2000

20101108 106 02 1 5 2500

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101108 102 02 1 1 1400

20101108 106 03 2 5 2500

20101108 109 01 1 1 1000

20101109 106 04 2 4 2000

20101109 106 04 2 5 2500

20101109 103 01 1 1 1700

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

Overview

Data Load

Data Loading into Columnstore Bulk Import

Dele

te b

itm

ap

Data Loading into Columnstore Staging Table

SQL 2016 Parallel Insert into Columnstore index

Dele

te b

itm

ap

Insert into ltcolumnstoregt

select from ltrowstore-staginggt

Overview

Data Load

New physical Structures

No PKFK constraints Uniqueness can be enforced through Materialized Views

BTREE (NCI)

Mapping Index(internal)

Dele

te b

itm

ap

Dele

te b

itm

ap

Overview

Data Load

New physical Structures

Query Performance

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

SELECT ProductKey SUM (SalesAmount)

FROM SalesTable

WHERE OrderDateKey lt 20101108

GROUP BY ProductKey

Column Elimination

Ro

wg

roup

Elim

inatio

n

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 3: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

ETL

Multi-Dimensional

(MOLAP)

Tabular

(VertiPaq)

Query

ExecQuery

Exec

SSAS 2016

ETL

Query

exec

Multi-Dimensional Tabular

Direct QueryROLAP

SSAS 2016

8

Columnstore Index Why

Improved compressionData from same domain

compress better

Reduced IO

Fetch only columns needed

hellip

Data stored as rows Data stored as columns

Ideal for OLTP Efficient operation on small set of rows

C1 C2 C3 C5C4

Improved PerformanceMore data fits in memory

Optimized for CPU utilization

Ideal for DW Workload

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101107 106 01 1 6 3000

20101107 103 04 2 1 1700

20101107 109 04 2 2 2000

20101107 103 03 2 1 1700

20101107 106 05 3 4 2000

20101108 106 02 1 5 2500

20101108 102 02 1 1 1400

20101108 106 03 2 5 2500

20101108 109 01 1 1 1000

20101109 106 04 2 4 2000

20101109 106 04 2 5 2500

20101109 103 01 1 1 1700

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101107 106 01 1 6 3000

20101107 103 04 2 1 1700

20101107 109 04 2 2 2000

20101107 103 03 2 1 1700

20101107 106 05 3 4 2000

20101108 106 02 1 5 2500

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101108 102 02 1 1 1400

20101108 106 03 2 5 2500

20101108 109 01 1 1 1000

20101109 106 04 2 4 2000

20101109 106 04 2 5 2500

20101109 103 01 1 1 1700

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

Overview

Data Load

Data Loading into Columnstore Bulk Import

Dele

te b

itm

ap

Data Loading into Columnstore Staging Table

SQL 2016 Parallel Insert into Columnstore index

Dele

te b

itm

ap

Insert into ltcolumnstoregt

select from ltrowstore-staginggt

Overview

Data Load

New physical Structures

No PKFK constraints Uniqueness can be enforced through Materialized Views

BTREE (NCI)

Mapping Index(internal)

Dele

te b

itm

ap

Dele

te b

itm

ap

Overview

Data Load

New physical Structures

Query Performance

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

SELECT ProductKey SUM (SalesAmount)

FROM SalesTable

WHERE OrderDateKey lt 20101108

GROUP BY ProductKey

Column Elimination

Ro

wg

roup

Elim

inatio

n

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 4: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

ETL

Query

exec

Multi-Dimensional Tabular

Direct QueryROLAP

SSAS 2016

8

Columnstore Index Why

Improved compressionData from same domain

compress better

Reduced IO

Fetch only columns needed

hellip

Data stored as rows Data stored as columns

Ideal for OLTP Efficient operation on small set of rows

C1 C2 C3 C5C4

Improved PerformanceMore data fits in memory

Optimized for CPU utilization

Ideal for DW Workload

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101107 106 01 1 6 3000

20101107 103 04 2 1 1700

20101107 109 04 2 2 2000

20101107 103 03 2 1 1700

20101107 106 05 3 4 2000

20101108 106 02 1 5 2500

20101108 102 02 1 1 1400

20101108 106 03 2 5 2500

20101108 109 01 1 1 1000

20101109 106 04 2 4 2000

20101109 106 04 2 5 2500

20101109 103 01 1 1 1700

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101107 106 01 1 6 3000

20101107 103 04 2 1 1700

20101107 109 04 2 2 2000

20101107 103 03 2 1 1700

20101107 106 05 3 4 2000

20101108 106 02 1 5 2500

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101108 102 02 1 1 1400

20101108 106 03 2 5 2500

20101108 109 01 1 1 1000

20101109 106 04 2 4 2000

20101109 106 04 2 5 2500

20101109 103 01 1 1 1700

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

Overview

Data Load

Data Loading into Columnstore Bulk Import

Dele

te b

itm

ap

Data Loading into Columnstore Staging Table

SQL 2016 Parallel Insert into Columnstore index

Dele

te b

itm

ap

Insert into ltcolumnstoregt

select from ltrowstore-staginggt

Overview

Data Load

New physical Structures

No PKFK constraints Uniqueness can be enforced through Materialized Views

BTREE (NCI)

Mapping Index(internal)

Dele

te b

itm

ap

Dele

te b

itm

ap

Overview

Data Load

New physical Structures

Query Performance

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

SELECT ProductKey SUM (SalesAmount)

FROM SalesTable

WHERE OrderDateKey lt 20101108

GROUP BY ProductKey

Column Elimination

Ro

wg

roup

Elim

inatio

n

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 5: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

8

Columnstore Index Why

Improved compressionData from same domain

compress better

Reduced IO

Fetch only columns needed

hellip

Data stored as rows Data stored as columns

Ideal for OLTP Efficient operation on small set of rows

C1 C2 C3 C5C4

Improved PerformanceMore data fits in memory

Optimized for CPU utilization

Ideal for DW Workload

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101107 106 01 1 6 3000

20101107 103 04 2 1 1700

20101107 109 04 2 2 2000

20101107 103 03 2 1 1700

20101107 106 05 3 4 2000

20101108 106 02 1 5 2500

20101108 102 02 1 1 1400

20101108 106 03 2 5 2500

20101108 109 01 1 1 1000

20101109 106 04 2 4 2000

20101109 106 04 2 5 2500

20101109 103 01 1 1 1700

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101107 106 01 1 6 3000

20101107 103 04 2 1 1700

20101107 109 04 2 2 2000

20101107 103 03 2 1 1700

20101107 106 05 3 4 2000

20101108 106 02 1 5 2500

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101108 102 02 1 1 1400

20101108 106 03 2 5 2500

20101108 109 01 1 1 1000

20101109 106 04 2 4 2000

20101109 106 04 2 5 2500

20101109 103 01 1 1 1700

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

Overview

Data Load

Data Loading into Columnstore Bulk Import

Dele

te b

itm

ap

Data Loading into Columnstore Staging Table

SQL 2016 Parallel Insert into Columnstore index

Dele

te b

itm

ap

Insert into ltcolumnstoregt

select from ltrowstore-staginggt

Overview

Data Load

New physical Structures

No PKFK constraints Uniqueness can be enforced through Materialized Views

BTREE (NCI)

Mapping Index(internal)

Dele

te b

itm

ap

Dele

te b

itm

ap

Overview

Data Load

New physical Structures

Query Performance

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

SELECT ProductKey SUM (SalesAmount)

FROM SalesTable

WHERE OrderDateKey lt 20101108

GROUP BY ProductKey

Column Elimination

Ro

wg

roup

Elim

inatio

n

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 6: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101107 106 01 1 6 3000

20101107 103 04 2 1 1700

20101107 109 04 2 2 2000

20101107 103 03 2 1 1700

20101107 106 05 3 4 2000

20101108 106 02 1 5 2500

20101108 102 02 1 1 1400

20101108 106 03 2 5 2500

20101108 109 01 1 1 1000

20101109 106 04 2 4 2000

20101109 106 04 2 5 2500

20101109 103 01 1 1 1700

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101107 106 01 1 6 3000

20101107 103 04 2 1 1700

20101107 109 04 2 2 2000

20101107 103 03 2 1 1700

20101107 106 05 3 4 2000

20101108 106 02 1 5 2500

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101108 102 02 1 1 1400

20101108 106 03 2 5 2500

20101108 109 01 1 1 1000

20101109 106 04 2 4 2000

20101109 106 04 2 5 2500

20101109 103 01 1 1 1700

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

Overview

Data Load

Data Loading into Columnstore Bulk Import

Dele

te b

itm

ap

Data Loading into Columnstore Staging Table

SQL 2016 Parallel Insert into Columnstore index

Dele

te b

itm

ap

Insert into ltcolumnstoregt

select from ltrowstore-staginggt

Overview

Data Load

New physical Structures

No PKFK constraints Uniqueness can be enforced through Materialized Views

BTREE (NCI)

Mapping Index(internal)

Dele

te b

itm

ap

Dele

te b

itm

ap

Overview

Data Load

New physical Structures

Query Performance

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

SELECT ProductKey SUM (SalesAmount)

FROM SalesTable

WHERE OrderDateKey lt 20101108

GROUP BY ProductKey

Column Elimination

Ro

wg

roup

Elim

inatio

n

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 7: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101107 106 01 1 6 3000

20101107 103 04 2 1 1700

20101107 109 04 2 2 2000

20101107 103 03 2 1 1700

20101107 106 05 3 4 2000

20101108 106 02 1 5 2500

OrderDateKey ProductKey StoreKey RegionKey Quantity SalesAmount

20101108 102 02 1 1 1400

20101108 106 03 2 5 2500

20101108 109 01 1 1 1000

20101109 106 04 2 4 2000

20101109 106 04 2 5 2500

20101109 103 01 1 1 1700

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

Overview

Data Load

Data Loading into Columnstore Bulk Import

Dele

te b

itm

ap

Data Loading into Columnstore Staging Table

SQL 2016 Parallel Insert into Columnstore index

Dele

te b

itm

ap

Insert into ltcolumnstoregt

select from ltrowstore-staginggt

Overview

Data Load

New physical Structures

No PKFK constraints Uniqueness can be enforced through Materialized Views

BTREE (NCI)

Mapping Index(internal)

Dele

te b

itm

ap

Dele

te b

itm

ap

Overview

Data Load

New physical Structures

Query Performance

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

SELECT ProductKey SUM (SalesAmount)

FROM SalesTable

WHERE OrderDateKey lt 20101108

GROUP BY ProductKey

Column Elimination

Ro

wg

roup

Elim

inatio

n

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 8: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

Overview

Data Load

Data Loading into Columnstore Bulk Import

Dele

te b

itm

ap

Data Loading into Columnstore Staging Table

SQL 2016 Parallel Insert into Columnstore index

Dele

te b

itm

ap

Insert into ltcolumnstoregt

select from ltrowstore-staginggt

Overview

Data Load

New physical Structures

No PKFK constraints Uniqueness can be enforced through Materialized Views

BTREE (NCI)

Mapping Index(internal)

Dele

te b

itm

ap

Dele

te b

itm

ap

Overview

Data Load

New physical Structures

Query Performance

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

SELECT ProductKey SUM (SalesAmount)

FROM SalesTable

WHERE OrderDateKey lt 20101108

GROUP BY ProductKey

Column Elimination

Ro

wg

roup

Elim

inatio

n

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 9: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

Overview

Data Load

Data Loading into Columnstore Bulk Import

Dele

te b

itm

ap

Data Loading into Columnstore Staging Table

SQL 2016 Parallel Insert into Columnstore index

Dele

te b

itm

ap

Insert into ltcolumnstoregt

select from ltrowstore-staginggt

Overview

Data Load

New physical Structures

No PKFK constraints Uniqueness can be enforced through Materialized Views

BTREE (NCI)

Mapping Index(internal)

Dele

te b

itm

ap

Dele

te b

itm

ap

Overview

Data Load

New physical Structures

Query Performance

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

SELECT ProductKey SUM (SalesAmount)

FROM SalesTable

WHERE OrderDateKey lt 20101108

GROUP BY ProductKey

Column Elimination

Ro

wg

roup

Elim

inatio

n

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 10: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

Overview

Data Load

Data Loading into Columnstore Bulk Import

Dele

te b

itm

ap

Data Loading into Columnstore Staging Table

SQL 2016 Parallel Insert into Columnstore index

Dele

te b

itm

ap

Insert into ltcolumnstoregt

select from ltrowstore-staginggt

Overview

Data Load

New physical Structures

No PKFK constraints Uniqueness can be enforced through Materialized Views

BTREE (NCI)

Mapping Index(internal)

Dele

te b

itm

ap

Dele

te b

itm

ap

Overview

Data Load

New physical Structures

Query Performance

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

SELECT ProductKey SUM (SalesAmount)

FROM SalesTable

WHERE OrderDateKey lt 20101108

GROUP BY ProductKey

Column Elimination

Ro

wg

roup

Elim

inatio

n

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 11: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

Data Loading into Columnstore Bulk Import

Dele

te b

itm

ap

Data Loading into Columnstore Staging Table

SQL 2016 Parallel Insert into Columnstore index

Dele

te b

itm

ap

Insert into ltcolumnstoregt

select from ltrowstore-staginggt

Overview

Data Load

New physical Structures

No PKFK constraints Uniqueness can be enforced through Materialized Views

BTREE (NCI)

Mapping Index(internal)

Dele

te b

itm

ap

Dele

te b

itm

ap

Overview

Data Load

New physical Structures

Query Performance

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

SELECT ProductKey SUM (SalesAmount)

FROM SalesTable

WHERE OrderDateKey lt 20101108

GROUP BY ProductKey

Column Elimination

Ro

wg

roup

Elim

inatio

n

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 12: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

Data Loading into Columnstore Staging Table

SQL 2016 Parallel Insert into Columnstore index

Dele

te b

itm

ap

Insert into ltcolumnstoregt

select from ltrowstore-staginggt

Overview

Data Load

New physical Structures

No PKFK constraints Uniqueness can be enforced through Materialized Views

BTREE (NCI)

Mapping Index(internal)

Dele

te b

itm

ap

Dele

te b

itm

ap

Overview

Data Load

New physical Structures

Query Performance

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

SELECT ProductKey SUM (SalesAmount)

FROM SalesTable

WHERE OrderDateKey lt 20101108

GROUP BY ProductKey

Column Elimination

Ro

wg

roup

Elim

inatio

n

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 13: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

Overview

Data Load

New physical Structures

No PKFK constraints Uniqueness can be enforced through Materialized Views

BTREE (NCI)

Mapping Index(internal)

Dele

te b

itm

ap

Dele

te b

itm

ap

Overview

Data Load

New physical Structures

Query Performance

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

SELECT ProductKey SUM (SalesAmount)

FROM SalesTable

WHERE OrderDateKey lt 20101108

GROUP BY ProductKey

Column Elimination

Ro

wg

roup

Elim

inatio

n

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 14: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

No PKFK constraints Uniqueness can be enforced through Materialized Views

BTREE (NCI)

Mapping Index(internal)

Dele

te b

itm

ap

Dele

te b

itm

ap

Overview

Data Load

New physical Structures

Query Performance

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

SELECT ProductKey SUM (SalesAmount)

FROM SalesTable

WHERE OrderDateKey lt 20101108

GROUP BY ProductKey

Column Elimination

Ro

wg

roup

Elim

inatio

n

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 15: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

Overview

Data Load

New physical Structures

Query Performance

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

SELECT ProductKey SUM (SalesAmount)

FROM SalesTable

WHERE OrderDateKey lt 20101108

GROUP BY ProductKey

Column Elimination

Ro

wg

roup

Elim

inatio

n

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 16: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

OrderDateKey

20101107

20101107

20101107

20101107

20101107

20101108

ProductKey

106

103

109

103

106

106

StoreKey

01

04

04

03

05

02

RegionKey

1

2

2

2

3

1

Quantity

6

1

2

1

4

5

SalesAmount

3000

1700

2000

1700

2000

2500

OrderDateKey

20101108

20101108

20101108

20101109

20101109

20101109

ProductKey

102

106

109

106

106

103

StoreKey

02

03

01

04

04

01

RegionKey

1

2

1

2

2

1

Quantity

1

5

1

4

5

1

SalesAmount

1400

2500

1000

2000

2500

1700

SELECT ProductKey SUM (SalesAmount)

FROM SalesTable

WHERE OrderDateKey lt 20101108

GROUP BY ProductKey

Column Elimination

Ro

wg

roup

Elim

inatio

n

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 17: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

C1

Column vectors

Batch object

C10 C14

Process multiple rows together for efficiency

Significant reduction in instructions

X

X

X

X

Single Thread Batch Mode Execution

Batch Anti-Semi-Join

Multiple count DISTINCT

Window Aggregates

Sort

New in SQL 2016

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 18: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

Select SUM(sales) from ltcolumnstoregt

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 19: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

20 rows(R1)

30 rows

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 20: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

Try to do in the ETL

Try to do on a partition that will be switched IN

Update only what you need

Try to avoid

Join might be better

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 21: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

Overview

Data Load

New physical Structures

Query Performance

Supportability

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 22: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

Operation SQL 2014 SQL 2016

Removing Deleted Rows Requires Index REBUILD Index REORGANIZE

bull Remove deleted from single compressed RG

bull Merge one or more compressed RGs with

deleted rows

Done ONLINE

Smaller RG size resulting from

bull Smaller BATCHSIZE

bull Memory Pressure

bull Index build Residual

Index REBUILD Index REORGANIZE

Ordering Rows bull Create clustered index

bull Create columnstore

index by dropping

clustered Index

No Changes

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 23: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 24: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

29

Operation SQL 2014 SQL 2016

Query bull Rowgroup granularity

bull No support of RCSI or SI

bull Recommendation use Read

Uncommitted

bull Support of SI and RCSI (non blocking)

Insert bull Lock at row level (trickle insert)

bull Rowgroup level for set of rows

bull No changes

Delete bull Lock at Rowgroup level bull Row level lock in conjunction with NCI

Update bull Lock at Rowgroup level

bull Implemented as DeleteInsert

bull Row level lock in conjunction with NCI

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 25: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

30

Operation SQL 2014 SQL 2016

BackupRestore bull Just like any other index

bull Each SEGMENT is persisted using LOB

datatype

bull No changes

AlwaysOn Failover

Clustering (FCI)

bull Fully Supported bull Fully Supported

AlwaysON

Availability Groups

bull Fully supported except Readable

Secondary

bull Fully Supported with Readable Secondary

Index

CreateRebuild

bull Offline bull Offline

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 26: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

Overview

Data Load

New physical Structures

Query Performance

Supportability

Concurrency and High Availability

Operational Analytics

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 27: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

IIS Server

ETL

Key Issues Complex Implementation

Requires two Servers (CapEx and OpEx)

Data Latency in Analytics

More businesses demandrequire real-time Analytics

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity Sum(Sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 28: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

IIS Server

Benefits

No Data Latency

No ETL

No Separate DW

Challenges

Minimizing Impact on

Insert into lttransactionsgt

values (lsquoltupc-codegt lsquoflowersrsquo $2000)

Select ProduceName ExpiryDate Quantity sum (sales)

From lttransactionsgt

Where ProduceType =lsquoperishablesrsquo

Group By ProduceName ExpiryDate

This is Real-Time ANALYTICS

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 29: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

SQL In-Memory Technologies

Over 100x analytics query speed

and significant data compression

with In-Memory ColumnStore

Up to 30x faster transaction

processing with In-Memory OLTP

Faster AnalyticsFaster Transactions+IN-MEMORY OLTP IN-MEMORY DW

+

Using the same tables

In 2016 and Azure DBSQL Real-Time Analytics

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 30: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108

Please fill online evaluation for both

speakers and overall event

You have both links in the last EVENT UPDATE email

Session evaluation formhttpwwwsqlsaturdaycom481sessionssessionevaluationaspx

Overall event evaluation formhttpwwwsqlsaturdaycomEventEvalaspx

Page 31: Overview of ColumnStore Index in SQL Server 2016 and Azure ...files.meetup.com/19858010/10_2016-Inside Columnar Indexes.pdf · 20101107 20101107 20101107 20101107 20101107 20101108