Restrictions on Optimizer Directives

You can specify optimizer directives for any query in a DELETE, SELECT, or UPDATE statement, unless it includes any of the following syntax elements:
  • A query accessing a table in a database of a remote database server instance
  • In , a statement with the WHERE CURRENT OF cursor clause
For queries that use ANSI/ISO-compliant syntax to specify a join, the query optimizer does not follow some directives:
  • The join-method directives (USE_NL, AVOID_NL, USE_HASH, AVOID_HASH, /BUILD, and /PROBE) are ignored, except in cases where the optimizer rewrites the query so that it is no longer uses the ANSI/ISO syntax.
  • The join-order directive (ORDERED) is ignored in ANSI-compliant joined queries that specify the RIGHT OUTER JOIN or FULL OUTER JOIN keywords.