Are there any inherit side effects when using a filtered index? E.g. if you insert a million rows, will the index take longer to process etc compared to having the same index that is non-filtered?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
There is always a threshold.
Let's look on the edge case -
- If all the records pass the filter then we have wasted CPU for nothing.
- If None of the records pass the filter than we invested some CPU filtering out records but we saved CPU, IO and memory for all the inserts we didn't do.
Your case is somewhere between.