What are delta stores and rowgroups in the context of columnstore indexes, and how do they affect performance over time?
Short answer
New rows inserted into a columnstore indexed table are first placed into a delta store, a small rowstore structure, before eventually being compressed into full columnstore rowgroups through a background process, meaning a table with a lot of small, frequent inserts can…
Advertisement
AModel answer
New rows inserted into a columnstore indexed table are first placed into a delta store, a small rowstore structure, before eventually being compressed into full columnstore rowgroups through a background process, meaning a table with a lot of small, frequent inserts can accumulate many delta store rows that have not yet been compressed, temporarily reducing query performance until they are processed.
-- Manually force a rebuild to compress delta store rows
-- into proper columnstore rowgroups
ALTER INDEX CCI_Sales ON SalesFact REORGANIZE;Real-world example
A data warehouse team notices report performance degrading slightly after a large batch of daily inserts and runs an index reorganize operation to compress the newly inserted delta store rows into optimized columnstore rowgroups.
Likely follow-ups
- How often should a columnstore index be reorganized or rebuilt for optimal performance?
- What triggers the automatic background process that compresses delta store rows?
Related topics