Bagikan melalui


Clustered Index Scan Showplan Operator

The Clustered Index Scan operator scans the clustered index specified in the Argument column of the query execution plan. When an optional WHERE:() predicate is present, only those rows that satisfy the predicate are returned. If the Argument column contains the ORDERED clause, the query processor has requested that the output of the rows be returned in the order in which the clustered index has sorted it. If the ORDERED clause is not present, the storage engine scans the index in the optimal way, without necessarily sorting the output.

Clustered Index Scan is a logical and physical operator.

Clustered index scan operator iconGraphical execution plan icon

Examples

The following example queries a table that has a clustered index. The output of the execution plan shows that the query optimizer uses the Clustered Index Scan operator to retrieve the specified rows.

USE AdventureWorks2008R2;
GO
SET NOCOUNT ON;
GO
SET SHOWPLAN_ALL ON;
GO
SELECT DISTINCT TransactionType
FROM Production.TransactionHistoryArchive;
GO
SET SHOWPLAN_ALL OFF;
GO

The execution plan output of the Clustered Index Scan operator appears below.

PhysicalOp

-----------------------------------------------------------------------

Clustered Index Scan

Argument

-----------------------------------------------------------------------

OBJECT:([AdventureWorks2008R2].[Production].[TransactionHistoryArchive].[PK_TransactionHistoryArchive_TransactionID])