Search notes:

Oracle SQL Plan operation HASH UNIQUE

The HASH UNIQUE plan operator performs the «distinct» of a select distinct query.
create table tq84_tab (
   id  number,
   txt varchar2(20),
   val number
);

explain plan for
   select distinct
      txt, val
   from
      tq84_tab
;

select * from table(dbms_xplan.display(format=>'basic'));
--
-- ---------------------------------------
-- | Id  | Operation          | Name     |
-- ---------------------------------------
-- |   0 | SELECT STATEMENT   |          |
-- |   1 |  HASH UNIQUE       |          |
-- |   2 |   TABLE ACCESS FULL| TQ84_TAB |
-- ---------------------------------------

drop table tq84_tab;

See also

The plan operations
_gby_hash_aggregation_enabled

Index