浏览 2904 次
锁定老帖子 主题:头大,请大虾提供百万数据查询优化思路。
该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2008-04-29
select * from ssinvoice iv, ssfeedetail f where f.ssfd_invoice_no = iv.ssiv_invoice_no and f.ssfd_biz_type_code = '3' AND f.ssfd_imp_exp_flag = 'E' AND f.ssfd_org_id = '86' AND f.ssfd_supplier_code = 'ESHA00001259' AND (f.ssfd_payment_flag != 'Y' OR f.ssfd_payment_flag IS NULL) AND (f.ssfd_wo_status = '2' OR f.ssfd_wo_status IS NULL) and iv.ssiv_entrust_no is null Execution Plan ---------------------------------------------------------- 0 SELECT STATEMENT Optimizer=CHOOSE (Cost=1311 Card=117 Bytes= 70902) 1 0 NESTED LOOPS (Cost=1311 Card=117 Bytes=70902) 2 1 TABLE ACCESS (BY GLOBAL INDEX ROWID) OF 'SSFEEDETAIL' (C ost=883 Card=214 Bytes=66126) 3 2 INDEX (RANGE SCAN) OF 'IDX_SSFD_ORG_SUPPLIER' (NON-UNI QUE) (Cost=29 Card=5986) 4 1 TABLE ACCESS (BY GLOBAL INDEX ROWID) OF 'SSINVOICE' (Cos t=2 Card=1 Bytes=297) 5 4 INDEX (UNIQUE SCAN) OF 'PK_SSINVOICE' (UNIQUE) (Cost=1 Card=1) Statistics ---------------------------------------------------------- 71 recursive calls 0 db block gets 8131 consistent gets 5533 physical reads 0 redo size 85181 bytes sent via SQL*Net to client 404 bytes received via SQL*Net from client 20 SQL*Net roundtrips to/from client 0 sorts (memory) 0 sorts (disk) 285 rows processed 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2008-04-29
2个表上的ssiv_invoice_no 都没有建索引吧?
|
|
返回顶楼 | |
发表时间:2008-04-29
谢谢
ssinvoice 上的ssiv_invoice_no 是主键。ssfeedetail 上没有建ssiv_invoice_no 索引。 |
|
返回顶楼 | |
发表时间:2008-04-29
其他的高手们都睡着了吗?
|
|
返回顶楼 | |