Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sunil Agarwal | Principal Program Manager

Similar presentations


Presentation on theme: "Sunil Agarwal | Principal Program Manager"— Presentation transcript:

1 Sunil Agarwal | Principal Program Manager
03 | Materialized Views and Concurrency Sunil Agarwal | Principal Program Manager

2 Clustered Columnstore Index: Materialized View
Enforcing Uniqueness Create a materialized view create view dbo.myview_t_account with schemabinding as select accountkey,accounttype, accountcodealternatekey from dbo.T_ACCOUNT -- create a materialized view create unique clustered index clix_my_t_account on myview_t_account (accountkey) Avoiding Scan of Clustered Columnstore Index Create nonclustered index on MV with included column(s) Pros – good for equality and short-range scans Cons – Storage overhead and expensive DML operations Columnstore technology was first introduced in SQL Server 2012 and has been significantly enhanced for SQL Server Columnstore indexes can not only accelerate data warehouse workloads by an order of magnitude but also reduce storage requirements by an order of magnitude. Columnstore indexes are a hybrid technology leveraging the best of disk & in-memory capabilities. In this session we cover how to take advantage of columnstore capabilities in your applications and dive into the internals of how columnstore works.

3 Clustered Columnstore Index: Concurrency
Querying Higher Granularity Locks for efficiency: ROWGROUP granularity Will cause blocking with concurrent DMLs. No support of RCSI or SI Recommendation: use Read Uncommitted Isolation level with concurrent DML Insert Optimized for DW load: Concurrent Inserts are allowed into same ROWGROUP DELETE Takes X lock on the ROWGROUP Does not block INSERT as they go into a new ROWGROUP UPDATE Done as DELETE followed by INSERT

4 Columnstore Index: Catalog Views
sys.column_store_row_groups Visibility into all columnstore row groups (in columnar + delta store) Use this DMV to determine number of delta stores Every partition has at least one delta store Each partition can have multiple delta stores Use this DMV to determine quality of clustered columnstore index: If rowgroup contains <1M rows, investigate why sys.column_store_segments Find ranges of column value for segment elimination Dictionary usage Segment size sys.column_store_dictionaries number of entries in primary and secondary Size

5 Materialized Views and Concurrency [Sunil Agarwal]

6


Download ppt "Sunil Agarwal | Principal Program Manager"

Similar presentations


Ads by Google