- 最后登录
- 2015-3-5
- 在线时间
- 145 小时
- 威望
- 0
- 金钱
- 455
- 注册时间
- 2013-7-28
- 阅读权限
- 10
- 帖子
- 33
- 精华
- 0
- 积分
- 0
- UID
- 1173
|
1#
发表于 2015-3-5 14:09:57
|
查看: 4822 |
回复: 6
db version 11.2.0.3
os:aix
SQL_ID 00pspjfdy328d
--------------------
DELETE FROM DDS.CUP_ACCOUNT T1 WHERE EXISTS( SELECT 1 FROM
ODS.CUP_ACCOUNT T2 WHERE T2.BDP_ETL_DATE = '20150201' AND
T1.ACCT_NMBR = SUBSTR(T2.CARD_NMBR,1,13) AND T1.CURR_CODE =
TRIM(T2.CURR_CODE) )
Plan hash value: 2786671412
----------------------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
----------------------------------------------------------------------------------------------------------------
| 0 | DELETE STATEMENT | | | | | 199K(100)| |
| 1 | DELETE | CUP_ACCOUNT | | | | | |
| 2 | HASH JOIN RIGHT SEMI | | 2172K| 93M| 90M| 199K (11)| 00:13:44 |
| 3 | INDEX FAST FULL SCAN| IDX_CUP_ACCOUNT_EDT_CNMBR_CCD | 2445K| 62M| | 1174 (51)| 00:00:05 |
| 4 | TABLE ACCESS FULL | CUP_ACCOUNT | 13M| 238M| | 193K (11)| 00:13:19 |
----------------------------------------------------------------------------------------------------------------
像上述sql,外表有可能走索引吗?全表扫消耗很大 |
|