了解oracle中的执行计划

时间:2016-08-03 18:36:23

标签: oracle11g sql-execution-plan

enter image description here

我在Oracle中运行了一个SQL查询并生成了这个执行计划。我是Oracle执行计划的新手。如果有人可以帮助我根据Oracle中生成的下面的执行计划,那将是非常有帮助的。

enter image description here

谓词信息(用红色突出显示)是什么意思?

查询详细信息(可以采取哪些措施来提高性能?)

select 
    master.acname,branch.bname,
    branch.blocation||'-'||branch.barea as blocation, 
    trans.location  as location,
    location.shortcode||'/'||substr(voucherno,1,8)||'-'||vouchertype||substr(voucherno,9,15) as voucherno,
    transtype.transtype,
    voucherdate, particular, trans.drcr,
    case drcr 
       when 'D' then amount 
       else NULL 
    end as debit,
    case drcr 
       when 'C' then amount 
       else NULL 
    end as credit,
    master.acname as repeatedname,
    master.accode as accode
from  
    trans, branch, master, transtype, location
where 
    trans.cid = 'BCDTRA0003'
    --and   trans.location=v_location
    and voucherdate between '01-APR-2015' and '01-APR-2015'
    and trans.accode in (select accode from master)
    and trans.deleteinvoice is NULL
    and trans.MANUAL = 1 
    and trans.voucherprefix = transtype.type
    and (master.cid = trans.cid or master.cid = '9999999999')
    and trans.accode = master.accode
    and trans.cid = branch.cid
    and trans.bid = branch.bid
    and branch.blocation = location.blocation
/

1 个答案:

答案 0 :(得分:0)

您需要使用Oracle的EXPLAINPLAN语句。这是Oracle上的官方文档。

https://docs.oracle.com/cd/B19306_01/server.102/b14211/ex_plan.htm#g42231