create table NEW_TABLE NOLOGGING
as
select * from Table1 d
where not exists
(select /*+ UNNEST */
* from sa where d.cfr_ban= sa.ban and d.cfr_subscriber_no= sa.subscriber_no and sa.soc= d.cfr_p2 and sa.soc_seq_no = d.cfr_p3);
 The plan is:
------------------------------------------------------------------------------------------------------------------------
| Id  | Operation                                     | Name                   | Rows  | Bytes | Cost  | Pstart| Pstop |
------------------------------------------------------------------------------------------------------------------------
|   0 | CREATE TABLE STATEMENT                        |                        |       |       |     4 |       |       |
|   1 |  LOAD AS SELECT                               | NEW_TABLE   |       |       |       |       |       |
|   2 |   OPTIMIZER STATISTICS GATHERING              |                        |     3 |   735 |     3 |       |       |
|   3 |    NESTED LOOPS ANTI                          |                        |     3 |   735 |     3 |       |       |
|   4 |     TABLE ACCESS FULL                         | TABLE1            |     3 |   633 |     2 |       |       |
|*  5 |     TABLE ACCESS BY GLOBAL INDEX ROWID BATCHED| SERVICE_AGREEMENT      |     1 |    34 |     1 | ROWID | ROWID |
|*  6 |      INDEX RANGE SCAN                         | SA_99IX |   433K|       |     1 |       |       |
------------------------------------------------------------------------------------------------------------------------
 
No comments:
Post a Comment