how columnstored index are compressed

sakuraime 2,326 Reputation points
2020-11-07T17:37:27.057+00:00

Are there any documents talks about how columnstored index are compressed and stored ?
I found there are compression method for ROW and PAGE.......from microsoft .

Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,634 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 110.8K Reputation points MVP
    2020-11-07T19:42:12.923+00:00

    There is plenty of documentation out there about columnstore. The very brief description is that since values are stored column-wise and not row-wise, this permits for a very good compression rate. If there are 1000 rows where FirstName = 'John', why store John 1000 times?

    If you want to learn about columnstore, Data Platform MVP Nico Neugebauer has many blog posts on the topic: http://www.nikoport.com/columnstore/

    Google can surely give you more information as well.

    0 comments No comments

  2. MelissaMa-MSFT 24,196 Reputation points
    2020-11-09T07:47:41.807+00:00

    HI @sakuraime ,

    There are two data compression types : Columnstore and Columnstore Archive Compression.

    By storing data grouped by columns, like values can be grouped together and therefore compress very effectively. Columnstore compression will often reduce the size of a table by 10x and offers significant improvements over standard SQL Server compression.

    Columnstore Archive Compression shrinks the data footprint of a columnstore index further but incurs an additional CPU/duration cost to read the data.

    Please also refer below links for more details:
    Hands-On with Columnstore Indexes: Part 1 Architecture
    Hands-On with Columnstore Indexes: Part 2 Best Practices and Guidelines

    Best regards
    Melissa


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    Hot issues October--Users always get connection timeout problem when using multi subnet AG via listener. Especially after failover to another subnet

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.