Problem Statement
Why should query hints be a last resort?
Explanation
Hints force a specific join, index, or plan shape. They may help in a pinch, but as data grows or distributions change, a forced plan can degrade.
Fix root causes first: SARGability, statistics, and indexing. Use hints sparingly and document why.
Code Solution
SolutionRead Only
-- Example (vendor-specific) SELECT /*+ INDEX(o idx_orders_status) */ * FROM orders o WHERE status='PAID';
