dropping unique indexes can cause to data unconsistancy and thus - wrong query results
dropping indexes on calculated columns - can even more dramatically reduce performance
increases usage of buffer pool - thus may be denial of servicing some memory loading CLR code or even regular queries. Due to lack of memory can cause more often recompilations
Before the OP gets led down a "never remove an index" path, let me state emphatically: Never say never.
Sometimes indexes cost you more than removing them would. There are many ways to examine this, such as sys.dm_db_index_usage_stats (which can tell you indexes that have a high volume of write activity but little or no read activity).
As always, you should test your changes in an isolated environment with realistic data and realistic load.
发布评论
评论(3)
如果索引是唯一索引,则可以防止插入重复值。如果删除它,则可能会在不合适的地方输入唯一值。
If an index is a unique index, it prevents that duplicate values are inserted. If you drop it, unique values could be entered where not appropriate.
在OP走上“永远不删除索引”的道路之前,让我强调一下:永远不要说永远。
有时索引的成本比删除它们要高。有很多方法可以检查这一点,例如 sys.dm_db_index_usage_stats (它可以告诉您具有大量写入活动但很少或没有读取活动的索引)。
与往常一样,您应该在具有实际数据和实际负载的隔离环境中测试您的更改。
Before the OP gets led down a "never remove an index" path, let me state emphatically: Never say never.
Sometimes indexes cost you more than removing them would. There are many ways to examine this, such as sys.dm_db_index_usage_stats (which can tell you indexes that have a high volume of write activity but little or no read activity).
As always, you should test your changes in an isolated environment with realistic data and realistic load.