Oracle半连接学习总结(十)

2014-11-24 13:31:22 · 作者: · 浏览: 9
mode: ALL_ROWS

Parsing user id: 92

Rows Row Source Operation

------- ---------------------------------------------------

6 NESTED LOOPS (cr=9 pr=0 pw=0 time=42 us)

6 NESTED LOOPS (cr=8 pr=0 pw=0 time=26 us cost=40 size=160 card=10)

6 SORT UNIQUE (cr=0 pr=0 pw=0 time=2 us)

6 COLLECTION ITERATOR PICKLER FETCHSTR_TO_TABLE (cr=0 pr=0 pw=0 time=1 us)

6 INDEX RANGE SCAN IDX_TABLE_1_A (cr=8 pr=0pw=0 time=0 us cost=1 size=0 card=1)(object id 80214)

6 TABLE ACCESS BY INDEX ROWID TABLE_1 (cr=1pr=0 pw=0 time=0 us cost=2 size=14 card=1)

with temp_table_2 as

(

select /*+cardinality(m,10)*/ to_number(column_value) a fromtable(str_to_table('1,2,3,4,5,6',',')) m

)

select c

from table_1 a, temp_table_2 b

where a.a=b.a /**/

call count cpu elapsed disk query current rows

------- ------ -------- ---------- ---------- ---------- ---------- ----------

Parse 1 0.00 0.00 0 90 0 0

Execute 1 0.00 0.00 0 0 0 0

Fetch 1 0.00 0.00 0 9 0 6

------- ------ -------- ---------- ---------- ---------- ---------- ----------

total 3 0.00 0.00 0 99 0 6

Misses in library cacheduring parse: 1

Optimizer mode: ALL_ROWS

Parsing user id: 92

Rows Row Source Operation

------- ---------------------------------------------------

6 NESTED LOOPS (cr=9 pr=0 pw=0 time=44 us)

6 NESTED LOOPS (cr=8 pr=0 pw=0 time=27 us cost=49 size=160 card=10)

6 COLLECTION ITERATOR PICKLER FETCHSTR_TO_TABLE (cr=0 pr=0 pw=0 time=2 us)

6 INDEX RANGE SCAN IDX_TABLE_1_A (cr=8 pr=0pw=0 time=0 us cost=1 size=0 card=1)(object id 80214)

6 TABLE ACCESS BY INDEX ROWID TABLE_1 (cr=1pr=0 pw=0 time=0 us cost=2 size=14 card=1)

with temp_table_2 as

(select /*+cardinality(m,10)*/ to_number(column_value) a fromtable(str_to_table('1,2,3,4,5,6',',')) m)

select c

from table_1

where a in (select a from temp_table_2) /*mmm*/

call count cpu elapsed disk query current rows

------- ------ -------- ---------- ---------- ---------- ---------- ----------

Parse 1 0.01 0.00 0 48 0 0

Execute 1 0.00 0.00 0 0 0 0

Fetch 1 0.00 0.00 0 14 0 6

------- ------ -------- ---------- ---------- ---------- ---------- ----------

total 3 0.01 0.00 0 62 0 6

Misses in library cacheduring parse: 1

Optimizer mode: ALL_ROWS

Parsing user id: 92

Rows Row Source Operation

------- ---------------------------------------------------

6 NESTED LOOPS (cr=14 pr=0 pw=0 time=43 us)

6 NESTED LOOPS (cr=13 pr=0 pw=0 time=27 us cost=45 size=130 card=10)

6 SORT UNIQUE (cr=0 pr=0 pw=0 time=2 us)

6 COLLECTION ITERATOR PICKLER FETCHSTR_TO_TABLE (cr=0 pr=0 pw=0 time=2 us)

6 INDEX RANGE SCAN IDX_TAB1_A (cr=13 pr=0 pw=0 time=0 us cost=2 size=0card=1)(object id 80310)

6 TABLE ACCESS BY INDEX ROWID TABLE_1 (cr=1pr=0 pw=0 time=0 us cost=3 size=11 card=1)

**********************