add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
1 rows affected
N
4
PLAN_TABLE_OUTPUT
SQL_ID 7w4sqbtxy0xnk, child number 0
-------------------------------------
with list(n) as ( select 1 from dual union all select 2 from dual
union all select 3 from dual union all select 4 from dual ) select n
from list minus select n from demo
Plan hash value: 3999078176
---------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
---------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 12 (100)| |
| 1 | MINUS | | | | | |
| 2 | SORT UNIQUE | | 4 | 12 | 9 (12)| 00:00:01 |
| 3 | VIEW | | 4 | 12 | 8 (0)| 00:00:01 |
| 4 | UNION-ALL | | | | | |
| 5 | FAST DUAL | | 1 | | 2 (0)| 00:00:01 |
| 6 | FAST DUAL | | 1 | | 2 (0)| 00:00:01 |
| 7 | FAST DUAL | | 1 | | 2 (0)| 00:00:01 |
| 8 | FAST DUAL | | 1 | | 2 (0)| 00:00:01 |
| 9 | SORT UNIQUE | | 3 | 39 | 3 (34)| 00:00:01 |
| 10 | INDEX FAST FULL SCAN| SYS_C0067934 | 3 | 39 | 2 (0)| 00:00:01 |
---------------------------------------------------------------------------------------
Note
-----
   - dynamic statistics used: dynamic sampling (level=2)
N
4
PLAN_TABLE_OUTPUT
SQL_ID 8npyqkjn0dm05, child number 0
-------------------------------------
with list(n) as ( select 1 from dual union all select 2 from dual
union all select 3 from dual union all select 4 from dual ) select n
from list where n not in (select n from demo)
Plan hash value: 1032247293
--------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | | | 10 (100)| |
|* 1 | HASH JOIN ANTI SNA | | 3 | 48 | 10 (0)| 00:00:01 |
| 2 | VIEW | | 4 | 12 | 8 (0)| 00:00:01 |
| 3 | UNION-ALL | | | | | |
| 4 | FAST DUAL | | 1 | | 2 (0)| 00:00:01 |
| 5 | FAST DUAL | | 1 | | 2 (0)| 00:00:01 |
| 6 | FAST DUAL | | 1 | | 2 (0)| 00:00:01 |
| 7 | FAST DUAL | | 1 | | 2 (0)| 00:00:01 |
| 8 | INDEX FAST FULL SCAN| SYS_C0067934 | 3 | 39 | 2 (0)| 00:00:01 |
--------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
   1 - access("N"="N")
Note
-----
   - dynamic statistics used: dynamic sampling (level=2)
N
4