What should you do to improve the query’s performance?

You are a database developer on an instance of SQL Server 2008. Your Sales database contains the following SalesDetail table: (Click on Exhibits to view table)
Currently, only a unique nonclustered index exists on the SalesOrderDetailID column named PK_SalesDetail. You have the following query that is performing poorly:
SELECT * FROM SalesDetail WITH (INDEX(PK_SalesDetail))
WHERE UnitPrice > 10 AND UnitPrice < 2000 AND CarrierTrackingNumber = ‘0538-491B-B6’;
The query generates the following actual execution plan:


What should you do to improve the query’s performance?
Exhibit:


A. Create a plan guide including the OPTIMIZE FOR hint.
B. Include the MAXDOP query hint in the query.
C. Modify the WHERE clause to use the BETWEEN operator.
D. Create a nonclustered index on the CarrierTrackingNumber and UnitPrice columns.

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.