Search notes:

Oracle SQL Plan operation: HASH JOIN ANTI

create table tq84_A (id number not null);
create table tq84_B (id number not null);
 
explain plan for
select * from tq84_A
where
   id not in (select id from tq84_B);
  
select * from table(dbms_xplan.display(format=>'basic'));  
-- 
-- -------------------------------------
-- | Id  | Operation          | Name   |
-- -------------------------------------
-- |   0 | SELECT STATEMENT   |        |
-- |   1 |  HASH JOIN ANTI    |        |
-- |   2 |   TABLE ACCESS FULL| TQ84_A |
-- |   3 |   TABLE ACCESS FULL| TQ84_B |
-- -------------------------------------
If the table tq84_B is created with id as nullable, the optimizer chooses HASH JOIN ANTI NA (rather than HASH JOIN ANTI NA).

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...', 1758199274, '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/hash-join/anti/index(55): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78