1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
select count(*)
from big
where object_id not in ( select object_id from small )
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.03 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 0.29 0.30 0 890 0 1
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 4 0.29 0.33 0 890 0 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 62
Rows Row Source Operation
------- ---------------------------------------------------
1 SORT AGGREGATE (cr=890 pr=0 pw=0 time=301969 us)
397840 HASH JOIN RIGHT ANTI (cr=890 pr=0 pw=0 time=1594361 us)
99 INDEX FULL SCAN SMALL_IDX (cr=1 pr=0 pw=0 time=631 us)(object id 52939)
398632 INDEX FAST FULL SCAN BIG_IDX (cr=889 pr=0 pw=0 time=1594608 us)(object id 52937)
********************************************************************************
select count(*)
from big
where not exists ( select null from small where small.object_id = big.object_id )
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 0.29 0.30 0 890 0 1
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 4 0.29 0.30 0 890 0 1
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 62
Rows Row Source Operation
------- ---------------------------------------------------
1 SORT AGGREGATE (cr=890 pr=0 pw=0 time=305323 us)
397840 HASH JOIN RIGHT ANTI (cr=890 pr=0 pw=0 time=1992169 us)
99 INDEX FULL SCAN SMALL_IDX (cr=1 pr=0 pw=0 time=529 us)(object id 52939)
398632 INDEX FAST FULL SCAN BIG_IDX (cr=889 pr=0 pw=0 time=1594607 us)(object id 52937) |
Partager