Use of certain Transact-SQL clauses, functions, and keywords is reflected in showplan output. These include group by, aggregates, distinct, order by, and select into clauses.
Use of certain Transact-SQL clauses, functions, and keywords is reflected in showplan output. These include group by, aggregates, distinct, order by, and select into clauses.
Message |
Explanation |
---|---|
GROUP BY |
The query contains a group by statement. |
The type of query is SELECT (into WorktableN). |
The step creates a worktable to hold intermediate results. |
Evaluate Grouped type AGGREGATE Evaluate Ungrouped type AGGREGATE. |
The query contains an aggregate function. “Grouped” indicates that there is a grouping column for the aggregate (vector aggregate). “Ungrouped” indicates that there is no grouping column (scalar aggregate). The variable indicates the type of aggregate. |
Evaluate Grouped ASSIGNMENT OPERATOR Evaluate Ungrouped ASSIGNMENT OPERATOR |
The query includes compute (ungrouped) or compute by (grouped). |
WorktableN created for DISTINCT. |
The query contains the distinct keyword in the select list and requires a sort to eliminate duplicates. |
WorktableN created for ORDER BY. |
The query contains an order by clause that requires ordering rows. |
This step involves sorting. |
The query includes on order by or distinct clause, and results must be sorted. |
Using GETSORTED |
The query created a worktable and sorted it. GETSORTED is a particular technique used to return the rows. |
The sort for WorktableN is done in Serial. The sort for WorktableN is done in Parallel. |
Indicates how the sort for a worktable is performed. |