ORACLE 查看執行計劃

1:

 

SQL> explain plan set statement_id ='test' for
  2 
  2  select c.cred_id, d.new_id
  3    from temp1                    a,
  4         t_cc_l0_crediantial      c,
  5         temp_etl_p10ids_oldnewid d,
  6         t_cc_party_policy_ass    b
  7   where a.policy_id = b.policy_id
  8     and b.party_id = c.party_id
  9     and c.idcard_no = d.old_id
 10     and b.enable_flg = '1'
 11     and c.enable_flg = '1'
 12     and c.idcard_type_cd = '1170010001'
 13  ;

 

 

2:

 select * from table(dbms_xplan.display('plan_table','test'));

 

3,如在pl/sql dev 中執行,可能某些地方顯示不全。故在sql windows 中執行.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章