Querying Microsoft SQL Server 2012/2014 — Question 3

You have a database application that uses Microsoft SQL Server 2012. You have a query named Query1 that returns four columns from a frequently updated table that has a clustered index. Three of the columns are referenced in the WHERE clause of the query. The three columns are part of a non-clustered index. The fourth column is not referenced in the WHERE clause.
Users report that the application begins to run slowly. You determine that the root cause for the performance issue is Query1.
You need to optimize the statement.
What should you do?

Answer options

Correct answer: K

Explanation

The correct action is to add a SET STATISTICS SHOWPLAN_XML ON statement before executing the query, as it provides detailed execution plans that can help in diagnosing performance issues. The other options either hint at query execution strategies that may not address the root cause or involve settings that do not directly improve the performance of the specific query in question.