For the exceptional situations where the optimizer cannot choose an optimal query execution plan, DB2 has added features such as the SELECTIVITY clause and optimization guidelines.
对于优化器不能选择最佳查询执行计划的例外情况,DB 2已经增加了诸如selectivity子句和优化指南之类的特性。
For comparison, Figure 3 illustrates the access plan where I forced the DB2 optimizer to ignore the index by adding the clause SELECTIVITY 1 to the predicate in the where clause.
为了便于比较,图3显示了通过将SELECTIVITY1子句添加到where子句的谓词中,强迫db2优化器忽略索引的访问计划。
For comparison, Figure 3 illustrates the access plan where I forced the DB2 optimizer to ignore the index by adding the clause SELECTIVITY 1 to the predicate in the where clause.
为了便于比较,图3显示了通过将SELECTIVITY1子句添加到where子句的谓词中,强迫db2优化器忽略索引的访问计划。
应用推荐