SQL> explain plan for
2 select * from objects
3 minus
4 select * from objects1
5 /
SQL> select * from table(dbms_xplan.display());
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
Plan hash value: 1313218784
--------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Ti
--------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 67090 | 5178K| | 1334 (1)| 00
| 1 | MINUS | | | | | |
| 2 | SORT UNIQUE | | 67090 | 5175K| 11M| 1330 (1)| 00
| 3 | TABLE ACCESS FULL| OBJECTS | 67090 | 5175K| | 95 (2)| 00
| 4 | SORT UNIQUE | | 30 | 2370 | | 4 (25)| 00
| 5 | TABLE ACCESS FULL| OBJECTS1 | 30 | 2370 | | 3 (0)| 00
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
SQL> explain plan for
2 select *
3 from objects
4 where not exists
5 (select * from objects1 where objects1.object_id = objects.object_id)
6 /
Explained.
SQL> select * from table(dbms_xplan.display());
PLAN_TABLE_OUTPUT
--------------------------------------------------------------------------------
Plan hash value: 212929155
--------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time
--------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 67060 | 6024K| 96 (2)| 00:00:
|* 1 | HASH JOIN RIGHT ANTI| | 67060 | 6024K| 96 (2)| 00:00:
| 2 | INDEX FULL SCAN | PK_OBJECTS1 | 30 | 390 | 1 (0)| 00:00:
| 3 | TABLE ACCESS FULL | OBJECTS | 67090 | 5175K| 95 (2)| 00:00:
--------------------------------------------------------------------------------