包含许多包含列的SQL Server宽索引 [英] SQL Server wide indexes with many include columns

查看:199
本文介绍了包含许多包含列的SQL Server宽索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我应该小心在非集群索引中添加太多包含列吗?

Should I be careful adding too many include columns to a non-cluster index?

据我所知,这会阻止对完全覆盖的查询进行书签查找,但我认为,如果列不是,那么维护索引会产生额外的成本static和索引的额外整体大小导致额外的物理读取。

I understand that this will prevent bookmark look-ups on fully covered queries, but the counter I assume is there's the additional cost of maintaining the index if the columns aren't static and the additional overall size of the index causing additional physical reads.

推荐答案

你在问题​​中说过:索引中有多个索引和/或多列的风险是在接收大量CUD(创建/更新/删除)操作的数据库中维护索引可能会变得很重要。

You said it in the question: the risk with having many indexes and/or many columns in indexes is that the cost of maintaining the indexes may become significant in databases which receive a lot of CUD (Create/Update/Delete) operations.

选择正确的索引,是一种涉及的艺术平衡最常见的用例,以及存储问题(通常是低优先级问题,但在某些情况下很重要),以及CUD操作的性能问题。

Selecting the right indexes, is an art of sort which involves balancing the most common use cases, along with storage concerns (typically a low priority issue, but important in some contexts), and performance issues with CUD ops.

这篇关于包含许多包含列的SQL Server宽索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆