Databases Reference
In-Depth Information
Figure 2-17: Properties of the Hash Aggregate operator, showing Hash Keys Build property.
Note, again, that a Hash Aggregate helps when the data is not sorted. If you create an
index that can provide sorted data, then the Query Optimizer may select a Stream
Aggregate instead. Run the following statement to create an index, and then execute
the previous query again, to verify that it uses a Stream Aggregate, as shown in the plan
displayed in Figure 2-18.
Search WWH ::




Custom Search