Which query hint should you use?

You administer a Microsoft SQL Server 2008 database that contains a stored procedure named dbo.SalesOrderDetails. The stored procedure has following definition:
CREATE PROCEDURE dbo.SalesOrderDetails @CustomerID int, @OrderDate datetime, @SalesOrderID int
AS
SELECT h.SalesOrderID, h.OrderDate, d.OrderQty, d.ProductID
FROM Sales.SalesOrderHeader h
INNER JOIN Sales.SalesOrderDetail d
ON d.SalesOrderID = h.SalesOrderID
WHERE h.CustomerID = @CustomerID or h.OrderDate > @OrderDate or h.SalesOrderID > @SalesOrderID
GO
Parameter values passed to the stored procedure largely vary. You discover that the stored procedure executes quickly for some parameters but slowly for other parameters. You need to ensure that the query plan generated is optimized to provide the most consistent execution times for any set of parameters passed to the stored procedure.
Which query hint should you use?
A. OPTION (KEEP PLAN)
B. OPTION (KEEPFIXED PLAN)
C. OPTION (OPTIMIZE FOR UNKNOWN)
D. OPTION (NOLOCK)
E. OPTION (RECOMPILE)
F. OPTION (FAST 25)
G. OPTION (MAXDOP 25)
H. OPTION (ROBUST PLAN)

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.