Search notes:
Oracle SQL Plan operation COUNT
The row source
COUNT
is used in conjunction with the pseudo column
rownum
.
create table tq84_tab (
val number,
flg varchar2(1)
);
explain plan for
select
rownum r,
val
from
tq84_tab
where
flg = 'y';
select * from table(dbms_xplan.display(format=>'basic'));
--
-- ---------------------------------------
-- | Id | Operation | Name |
-- ---------------------------------------
-- | 0 | SELECT STATEMENT | |
-- | 1 | COUNT | |
-- | 2 | TABLE ACCESS FULL| TQ84_TAB |
-- ---------------------------------------
drop table tq84_tab;