Querying Microsoft SQL Server 2012/2014 — Question 10

You are developing a database application by using Microsoft SQL Server 2012.
An application that uses a database begins to run slowly.
You discover that the root cause is a query against a frequently updated table that has a clustered index. The query returns four columns: three columns in its
WHERE clause contained in a non-clustered index and one additional column.
You need to optimize the statement.
What should you do?

Answer options

Correct answer: C

Explanation

The correct answer is C, as adding a FORCESEEK hint allows SQL Server to use the non-clustered index more efficiently by forcing it to seek rather than scan. Options A, B, E, F, G, H, and the SET statements do not directly optimize the query for the given scenario or provide the same level of performance improvement as a FORCESEEK hint.