如果查询中的表极其小(通常少于1,000行)或者是群集表,而且查询根本没有选择性的话,那么使用表扫描会更好一些。
If the table in your query are pretty small (usually fewer than 1,000 rows) or clustered tables, and your query is not selective at all, it would be beneficial to use a table scan.
然而,如果每个不同的索引值都有许多重复的行,而所关联的表是高度群集的,那么通过索引添加的连接成本可能很低。
However, if there are many duplicate rows per distinct index value, and the associated table is highly clustered, the added costs of joining through the index can be slight.
对于一个具有 10 行和三个群集的数据集,若使用电子数据表,需要花上 30 分钟才能完成。
With a data set of 10 rows and three clusters, that could take 30 minutes to work out using a spreadsheet.
应用推荐