You are a database administrator for AIOTestKing.com. You discover that a SQL Server 2005 application performs slowly when you execute the following query. SELECT * FROM Orders WHERE OrderStatus = ‘InProgress’ The application executes this query as an ad hoc query. This query usually executes much more quickly. The OrderStatus column is indexed. Only a small number of the rows contain the value InProgress.
However, the OrderStatus column index is not being used, even though the index is optimal for this query. You need to improve the performance of this query. However, you cannot modify the application that executes the query. Your solution must also minimize the impact on end users. What should you do?
A.
Update the statistics on the index.
B.
Rebuild the index by using a FILLFACTOR of 10 percent.
C.
Recreate the index to include all of the columns in the table.
D.
Create an indexed view of the Orders table.
Explanation:
If lots of data in an indexed column has been added, changed, or removed (that is, if the distribution of key values has changed), or the table has been truncated by using the TRUNCATE TABLE statement and then repopulated, use UPDATE STATISTICS.