Databases Reference
In-Depth Information
How to do it...
Follow the given steps to find table/index scans in execution plan and fix them:
1.
Execute the following query by keeping the Execution plan on:
SELECT
sh.SalesOrderID
FROM
SalesOrdHeaderDemo AS sh
JOIN
SalesOrdDetailDemo AS sd
ON
sh.SalesOrderID=sd.SalesOrderID
WHERE
sh.OrderDate='2005-07-01 00:00:00.000'
GO
You will find a table scan operator on both the tables, as shown in the
following screenshot.
The Execution plan suggests a missing index in the query, so
check the worthiness of this index also by looking at the key
field of the index to decide whether it is worth creating or not.
 
Search WWH ::




Custom Search