【发布时间】:2011-10-25 10:09:26
【问题描述】:
嘿伙计,我的表正在执行索引快速全扫描是出于某种原因。
这是我的查询
SELECT bo.bid,cu.cid
FROM ass2master_booking bo, ass2master_customer cu
WHERE bo.cid = cu.cid
and rownum < 135000;
这是跟踪文件
SELECT bo.bid,cu.cid
FROM ass2master_booking bo, ass2master_customer cu
WHERE bo.cid = cu.cid
and rownum < 135000
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 1 0.00 0.00 0 0 0 0
Execute 2 0.00 0.00 0 0 0 0
Fetch 9001 0.19 0.41 387 2131 0 134999
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 9004 0.19 0.41 387 2131 0 134999
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 5594
Rows Row Source Operation
------- ---------------------------------------------------
134999 COUNT STOPKEY (cr=2131 pr=387 pw=189 time=411804 us)
134999 HASH JOIN (cr=2131 pr=387 pw=189 time=276737 us)
150000 INDEX FAST FULL SCAN CUSTOMER_CID_IDX (cr=320 pr=315 pw=0 time=263 us)(object id 332052)
7412 TABLE ACCESS FULL ASS2MASTER_BOOKING (cr=1811 pr=44 pw=0 time=7566 us)
基本上,我被告知要为非结构化数据添加结构,我得到了 2 个包含 150,000 行的表,并确定以下哪种结构是最好的。
- 非聚集索引
- 聚集索引
- 散列聚类
- 非结构化数据。
上面给出了我选择进行测试的查询。
【问题讨论】:
标签: performance oracle