Search notes:

Oracle SQL Plan operation EXPRESSION EVALUATION

create table tq84_A as
select
   level                  num,
   rpad('x', 1000, 'x')   pad
from
   dual connect by level <= 10000;

create table tq84_B as
select
   trunc(mod(level, 100) * dbms_random.value(1, 100)) num,
   rpad('x', 1000, 'x') pad
from
   dual connect by level <= 10000;

explain plan for
select /*+ parallel(4) */
   a.num,
  (select count(*) from tq84_B b where b.num < a.num) cnt
from
   tq84_A a
where
   to_char(a.num) like '%157';
   

select * from table(dbms_xplan.display(format=>'basic'));
-- ---------------------------------------------
-- | Id  | Operation                | Name     |
-- ---------------------------------------------
-- |   0 | SELECT STATEMENT         |          |
-- |   1 |  PX COORDINATOR          |          |
-- |   2 |   PX SEND QC (RANDOM)    | :TQ10000 |
-- |   3 |    EXPRESSION EVALUATION |          |
-- |   4 |     PX BLOCK ITERATOR    |          |
-- |   5 |      TABLE ACCESS FULL   | TQ84_A   |
-- |   6 |     SORT AGGREGATE       |          |
-- |   7 |      TABLE ACCESS FULL   | TQ84_B   |
-- ---------------------------------------------

drop table tq84_A;
drop table tq84_B;

See also

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...', 1758199878, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/SQL/statement/execution/plan/operations/expression-evaluation/index(74): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78