Sorting is required when no index satisfies the requested ordering of fetched rows, or the optimizer determines that a sort is less expensive than an index scan.
如果没有索引满足所取的行的要求顺序,或者优化器断定排序的代价低于索引扫描,那么就需要进行排序。
Because the NPSI is a single ordered list, it is easy to see how DB2 could just toggle back and forth, index to table, index to table, and return rows in ZIPCODE order without sorting.
因为NPSI是一个单序列列表,很容易看到DB 2如何来回切换,从表到索引、索引到表,然后以ZIPCODE次序返回行,而不需要排序。
Because the NPSI is a single ordered list, it is easy to see how DB2 could just toggle back and forth, index to table, index to table, and return rows in ZIPCODE order without sorting.
因为NPSI是一个单序列列表,很容易看到DB 2如何来回切换,从表到索引、索引到表,然后以ZIPCODE次序返回行,而不需要排序。
应用推荐