找考题网-背景图
未分类题

You are the administrator of a SQL Server 2000 database. Using the default options configures the database. You drop indexes to facilitate a large import of data, and rebuild them after the import is complete.
Users report that response times from a stored procedure have become slower. In the stored procedure, you examine the following code.
CREATE PROCEDURE GetCustomer
( @CustomerID Int )
AS
SELECT FirstName, LastName, Address1, Address2, City,
State, Zip, MAX(PurchaseDate) AS LastPurchase
FROM Customers C
JOIN Addresses A ON A.AddressID = C.AddressID
JOIN Purchases P ON P.CustomerID = C.CustomerID
WHERE C.CustomerID = @CustomerID
GROUP BY FirstName, LastName, Address1, Address2, City, State, Zip
You want to improve the performance of the procedure by using the least amount of administrative effort. What should you do?
A.Recompile the stored procedure.
B.Update the database statistics.
C.Check the consistency of the database and repair errors.
D.Create a view and modify the stored procedure to use the view.

A.
Users
B.
CREATE
C.AddressID
D.AddressID
JOIN
E.CustomerID
F.CustomerID
WHERE
G.CustomerID
H.Recompile
I.
B.Update
J.
C.Check
K.
D.Create
L.


【参考答案】

A
解析:Explanation:ByrecompilingthestoredprocedureSQLServerwillcreateanewexecutionplanforthestatementsintheprocedure.SQLServerwilldetectthatstatisti......

(↓↓↓ 点击‘点击查看答案’看完整答案 ↓↓↓)
热门试题