包含许多包含列的SQL Server宽索引

编程入门 行业动态 更新时间:2024-10-26 16:35:03
本文介绍了包含许多包含列的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宽索引

本文发布于:2023-10-14 11:47:39,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1490967.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:索引   SQL   Server

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!