The NO_EXPAND hint prevents the cost-based optimizer from considering OR-expansion for
queries having OR conditions or INLISTS in the WHERE clause. Normally, the optimizer would
consider using OR expansion and use this method if it decides the cost is lower than not
using it.
SELECT /*+ NO_EXPAND */ name, salary
FROM emp
WHERE cost_center=9
OR cost_center=10;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10599713/viewspace-985719/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/10599713/viewspace-985719/
本文介绍了SQL查询优化器中的NO_EXPAND提示,该提示阻止成本基础优化器考虑具有OR条件或WHERE子句中IN列表的查询的OR扩展。通常,优化器会考虑使用OR扩展,并在决定其成本低于不使用它时采用此方法。
591

被折叠的 条评论
为什么被折叠?



