Some SQL statements require that data be ordered, including those with
ORDER BY, GROUP BY, and DISTINCT. MIN() and MAX() aggregates also require
ordering of data.
can sometimes avoid sorting steps for:
- statements with ORDER BY
See
can also perform the following optimizations, but they are
not based on cost:
- sort avoidance for DISTINCT and GROUP BYs
See
- statements with a MIN() aggregate
See