开发者

How to: Manage multiple overlapping indexes in SQL Server 2005

For the sake of example, I have a table with columns A B C D E F G H.

I have created two indexes on the table that correspond to the most used queries. The first is on columns B C D and E. The se开发者_运维百科cond is on B C D E and F.

The queries that use these columns are called the same number of times and they are each optimized with respect to the indexes.

My issue is - due to the multiple indexes I have on this table, the row size is quite large. I'd like to remove one of these indexes, but can't decide which one.

My question is - if I remove the first index (BCDE), will a query that uses these columns still be optimized by an index on (BCDEF)?


yes, it will. as well as queries that benefit from using an index on (B), or on (BC), or ON (BCD)


Yes. Although it might take a bit more I/O for any scans on the index as the index is a bit wider so will span more pages.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜