Microsoft Exam Questions

How would you optimize the performance of the stored procedure?

You are employed as a SQL Server 2012 database developer at ABC.com. You have a stored
procedure that is executed quite often. The stored procedure joins data from two tables.
ABC.com users report that the stored procedure takes a long time to execute. You analyze the

query plan and find that the stored procedure often makes use of table scans rather than indexes
when the estimated rows do not match the actual rows on one of the tables.
How would you optimize the performance of the stored procedure?

A.
You should make use of the KEEPIDENTITY table hint in the stored procedure.

B.
You should make use of the KEEPDEFAULTS table hint in the stored procedure.

C.
You should make use of the IGNORE_CONSTRAINTS table hint in the stored procedure.

D.
You should make use of the FORCESEEK table hint in the stored procedure.

E.
You should update statistics on the tables queried by the stored procedure.

Explanation: