May 2019
Intermediate to advanced
484 pages
11h 23m
English
A Sort is a blocking operator that is used to order the input based on one or more columns. Sorts can be expensive operations since they require additional memory to store intermediate results and CPU to perform the sort. If the intermediate results do not fit in memory, sorts may also generate I/O as the results will be saved in a worktable in TempDB.
If any of these happens, a sort warning will be visible in the execution plan. As with a hash warning, it will appear as a yellow caution symbol in the plan and the properties will give more details on how much data was spilled. There are the following two spill levels:
Read now
Unlock full access