解决方法
是的,基础表索引被自动使用 – 一个视图完全从底层表中提取数据.
关于在视图上创建索引的好处,请参见this MS Technet article.小摘录:
Using indexes to improve query@H_404_10@ performance is not a new concept;@H_404_10@ however,indexed views provide@H_404_10@ additional performance benefits that@H_404_10@ cannot be achieved using standard@H_404_10@ indexes. Indexed views can increase@H_404_10@ query performance in the following@H_404_10@ ways:
- Aggregations can be precomputed and stored in the index to minimize@H_404_10@ expensive computations during query execution.
- Tables can be prejoined and the resulting data set stored.
- Combinations of joins or aggregations can be stored.