Which action should you take?

You maintain a large production database on an instance of SQL Server 2008. The database is used by a several third-party applications. One of the applications includes a stored procedure defined as follows:
CREATE PROCEDURE Sales.GetSalesByTerritory
(
@Territory nvarchar(30)
)
AS
BEGIN
SELECT *
FROM Sales.SalesOrderHeader AS h, Sales.Customer AS c,Sales.SalesTerritory AS t
WHERE h.CustomerID = c.CustomerID AND c.TerritoryID = t.TerritoryID AND Name = @Territory
END;
Most sales orders are taken in the Northeast territory, and the stored procedure is performing poorly because it was originally optimized for the Southwest territory.
You want to optimize performance of the stored procedure without modifying any third-party code.
Which action should you take?
A. Create a template plan guide that includes the RECOMPILE hint.
B. Create a nonclustered index on the Name column of the SalesTerritory table.
C. Create an object plan guide that includes the OPTIMIZE FOR hint.
D. Partition the SalesOrderHeader table on the TerritoryID column.

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.