Databases Reference
In-Depth Information
5.
The following screenshot shows a non-clustered index seek:
Details of the execution plan in text format for the previous screenshot are as follows:
StmtText
------------------------
|--Index Seek(OBJECT:([AdventureWorks2012].[dbo].
[SalesOrdDetailDemo].[idx_non_clust_SalesOrdDetailDemo_
ModifiedDate]), SEEK:([AdventureWorks2012].[dbo].
[SalesOrdDetailDemo].[ModifiedDate]=CONVERT_
IMPLICIT(datetime,[@1],0)) ORDERED FORWARD)
6.
In the previous SELECT query, we had three fields and all were either belonging
to clustered index or non-clustered index. Now add two more fields ( ProductID ,
UnitPrice ) to the SELECT query.
SELECT
ModifiedDate,
SalesOrderID,
SalesOrderDetailID,
ProductID,
UnitPrice
FROM SalesOrdDetailDemo
WHERE ModifiedDate='2005-07-01 00:00:00.000'
GO
7.
We can see the index seek operator on a non-clustered index, but two new operators
also come up, Key Lookup and Nested Loop, as shown in the following screenshot:
 
Search WWH ::




Custom Search