gpt4 book ai didi

sql-server - SQL Server 2012 : performance columnstore index vs B-tree

转载 作者:行者123 更新时间:2023-12-03 16:45:54 24 4
gpt4 key购买 nike

列存储索引的好处之一是单个列的数据“在磁盘上彼此相邻”存储。这代表更好的压缩和更快的读取时间。

然而;当使用 B 树(常规的非聚集索引)时,那棵树的叶子不是数据本身吗?因此,当我在 A 列上创建索引时,A 列的所有字段是否都不会在磁盘上与表并行排序?这意味着数据可以被压缩并且可以快速读取。

简而言之:列存储索引何时比单列上的 B 树性能更高?

提前致谢!

最佳答案

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?



是的,A 列将被排序。但所有其他列都不会。列存储索引按排序顺序存储所有列(以 2^20 行的块为单位)。

关于sql-server - SQL Server 2012 : performance columnstore index vs B-tree,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9910182/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com