Multiple choice

Which of the following would stop the execution of a query if the query failed to rewrite?

  1. select /+ REWRITE_ON_ERROR/...

  2. select /+ REWRITE_OR_ERROR/...

  3. select /+ REWRITE_IN_ERROR/...

  4. select /+ REWRITE_ERROR/...

  5. select /+ REWRITE_If_ERROR/...

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The REWRITE_OR_ERROR hint causes query execution to stop if the optimizer fails to rewrite the query using a materialized view. Other listed hint variants (REWRITE_ON_ERROR, REWRITE_IN_ERROR, REWRITE_ERROR, REWRITE_If_ERROR) are not valid Oracle hints. This is useful when you want to ensure materialized view usage for performance.