简体   繁体   中英

SQL Server 2012: performance columnstore index vs B-tree

One of the benefits of a columnstore-index is that the data of a single column is stored "next to each other on disk". This stands for better compression and faster read times.

However; when using a B-tree (a regular non-clustered index), aren't the leafs of that tree the data itself? So when I make an index on column A, won't all the fields of column A appear sorted on disk in parallel to the table? This would mean the data could be compressed and could be read fast.

So in short: when exactly is a columnstore-index more performant than a B-tree on a single column?

Thanks in advance!

So when I make an index on column A, won't all the fields of column A appear sorted on disk in parallel to the table?

Yes, column A will be sorted. But all other columns won't. A column store index stores all columns in sorted order (in chunks of 2^20 rows).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM