Search notes:

Oracle SQL Plan operation FAST DUAL

The row source FAST DUAL is used when selecting an expression which does not involve DUMMY from dual.
The plan for select * from dual (which involves DUMMY through *) selects from DUAL with full table access:
explain plan for
   select * from dual;
   
select * from table(dbms_xplan.display(format=>'basic'));
--
-- ----------------------------------
-- | Id  | Operation         | Name |
-- ----------------------------------
-- |   0 | SELECT STATEMENT  |      |
-- |   1 |  TABLE ACCESS FULL| DUAL |
-- ----------------------------------
However, when selecting an «ordinary» expression from dual, the FAST DUAL row source is used:
explain plan for
   select sysdate from dual;
   
select * from table(dbms_xplan.display(format=>'basic'));
--
-- ---------------------------------
-- | Id  | Operation        | Name |
-- ---------------------------------
-- |   0 | SELECT STATEMENT |      |
-- |   1 |  FAST DUAL       |      |
-- ---------------------------------

See also

Using a PL/SQL function in a where clause
Does FAST DUAL select from x$dual?
Plan operations

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1740464671, '3.15.145.231', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/SQL/statement/execution/plan/operations/fast-dual/index(70): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78