nerdexam
Microsoft

70-451 · Question #41

You are a database developer. You plan to design a database solution by using SQL Server 2008. The database has a table named Sales. The Sales table contains 10 million rows. You discover that the…

The correct answer is C. Create a nonclustered index in the Country_id column of the Sales table. See the full explanation below for the reasoning.

Question

You are a database developer. You plan to design a database solution by using SQL Server 2008. The database has a table named Sales. The Sales table contains 10 million rows. You discover that the following query takes a long time to execute. SELECT s.sale_id,... FROM Sales AS s JOIN Country AS c ON s.Country_id = c.Country_id AND c.Country_name = 'USA' A summary of the execution plan is as shown in the following code segment. |--Hash Match(Inner Join, HASH:

([s].[Country_id]) = ([c].[Country_id]) |--Clustered Index Scan(OBJECT:([Country].[PK_Country_Country_id] AS [c]) |--Clustered Index Scan(OBJECT:([Sales].[PK_Sales_Sale_id] AS [s])) You need to ensure that the query retrieves data in minimum possible time. What should you do?

Options

  • AModify the query to use a loop join hint.
  • BModify the query to use a merge join hint.
  • CCreate a nonclustered index in the Country_id column of the Sales table.
  • DCreate a nonclustered index in the Country_name column of the Country table.

How the community answered

(37 responses)
  • A
    5% (2)
  • B
    3% (1)
  • C
    84% (31)
  • D
    8% (3)

Community Discussion

No community discussion yet for this question.

Full 70-451 Practice