Each rowgroup is then divided into a set of column segments, one segment for each column. The contents of each column segment are stored together. When querying data by column, the data warehouse simply needs to read the column segments for that column. Decompression is performed quickly in memory, and the results returned to the query.
Note: when you create a clustered columnstore index over a table, you don’t specify which columns to index; the entire table is indexed.
More info - https://docs.microsoft.com/en-nz/sql/relational-databases/indexes/columnstore-indexes-overview?view=sql-server-ver15
CREATE TABLE clusteredColumnstoreTable ( id int NOT NULL, firstName varchar (50), lastName varchar (50), zipCode varchar (10) ) WITH (CLUSTERED COLUMNSTORE INDEX);
No comments:
Post a Comment