组合列存储聚集索引和列存储非聚集索引的好处?
Benefit of combining a clustered columnstore index and a nonclustered columnstore index?
我 运行 提出一个关于 在数据仓库中索引一个大事实 table 的问题 要求实现 two 索引为了优化性能和建议创建的答案:
- 聚簇 columnstore 索引 (CCI)
- 以及部分列上的非聚集 columnstore 索引 (NCCI)
由于 CCI 包含 table 的所有列,我认为合并两个列存储索引(一个聚集索引和一个非聚集索引)没有意义,而是选择 :
- 聚簇 columnstore 索引 (CCI)
- 以及部分列上的非聚集 行存储 索引
(参见 microsoft documentation on columnstore index design guidance)
在大型事实 table 中将两个列存储索引(一个聚簇索引和一个非聚簇索引)组合起来有什么好处(如果有的话) SQL服务器数据库/数据仓库?
触发我提问的问题可以找到on this page,第70题。
我不知道我是否遗漏了什么或者他们的解决方案不准确。
如果有人能帮助我,那就太好了!
As a CCI includes all the table's columns, I would have thought that there would be no point in combining two columnstore indexes
确实是不允许的。如果你尝试你会得到
Msg 35339, Level 16, State 1, Line 5
Multiple columnstore indexes are not supported.
问题
由于 Index1 包含所有数据并针对聚合进行了优化,因此它应该是聚集列存储索引。
因此他对 Index2 的正确答案是包含列的唯一非聚集索引,其中任何非键列都是包含的列。
我 运行 提出一个关于 在数据仓库中索引一个大事实 table 的问题 要求实现 two 索引为了优化性能和建议创建的答案:
- 聚簇 columnstore 索引 (CCI)
- 以及部分列上的非聚集 columnstore 索引 (NCCI)
由于 CCI 包含 table 的所有列,我认为合并两个列存储索引(一个聚集索引和一个非聚集索引)没有意义,而是选择 :
- 聚簇 columnstore 索引 (CCI)
- 以及部分列上的非聚集 行存储 索引
(参见 microsoft documentation on columnstore index design guidance)
在大型事实 table 中将两个列存储索引(一个聚簇索引和一个非聚簇索引)组合起来有什么好处(如果有的话) SQL服务器数据库/数据仓库?
触发我提问的问题可以找到on this page,第70题。 我不知道我是否遗漏了什么或者他们的解决方案不准确。
如果有人能帮助我,那就太好了!
As a CCI includes all the table's columns, I would have thought that there would be no point in combining two columnstore indexes
确实是不允许的。如果你尝试你会得到
Msg 35339, Level 16, State 1, Line 5
Multiple columnstore indexes are not supported.
问题
由于 Index1 包含所有数据并针对聚合进行了优化,因此它应该是聚集列存储索引。
因此他对 Index2 的正确答案是包含列的唯一非聚集索引,其中任何非键列都是包含的列。