如何:在SQL Server 2005中管理多个重叠索引
For the sake of example, I have a table with columns A B C D E F G H.
为了举例,我有一个带有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 second is on B C D E and F.
我在表上创建了两个与最常用查询对应的索引。第一个是B C D和E列。第二个是B C D E和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)?
我的问题是 - 如果我删除第一个索引(BCDE),使用这些列的查询是否仍然会被(BCDEF)上的索引优化?
2 个解决方案
#1
7
yes, it will. as well as queries that benefit from using an index on (B), or on (BC), or ON (BCD)
是的,它会。以及在(B),或(BC)或ON(BCD)上使用索引的查询
更多相关文章
- 将Excel表格多个Sheet表的数据转换为SQL存储语句
- 根据(var2) (var3) (var3)极限X (var3)对var1(1,2,…)组的适当索
- Mysql order by语句未使用索引的思考
- Alibaba Java开发手册索引规约学习笔记
- 制作动态表格(最好的方法)
- java使用freemarker导出复杂的excel表格