Multiple choice technology databases

Always use hints while writing queries (e.g. WITH NOLOCK, WITH UPDLCK) since it will help the query optimizer

  1. True

  2. False

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

Query hints should only be used as a last resort when the optimizer fails to choose an efficient plan. Hints like NOLOCK can return uncommitted data (dirty reads). UPDATE locks can cause unintended blocking. Once hints are added, they persist even if data distribution changes and the optimizer would have chosen a better plan. Best practice is to trust the query optimizer unless there's a proven performance issue. The statement is false.