There are three unary operators you can use to enforce distinctness: GROUP SORTED
Distinct
, SORT Distinct
,
and HASH Distinct
. Each
has advantages and disadvantages. The optimizer chooses an efficient
distinct operator with respect to its use within the entire query
plan’s context.
See Table 1-3 for a list and description of all query processor operators.