Common SQL for Oracle---(3) Check execution Plan

Source: Internet
Author: User

---Check execution Plan----

[Email protected]

Select Plan_table_output from table (Dbms_xplan.display_awr (' &sql_id ', Null,null, ' Advanced +peeked_binds '));


---all [email protected]

SELECT A.instance_number,

A.SNAP_ID,

A.SQL_ID,

A.plan_hash_value,

To_char (B.begin_interval_time, ' yyyy/mm/dd hh24:mi:ss ')

From Dba_hist_sqlstat A, Dba_hist_snapshot B

WHERE sql_id = ' 3ug1bja99mtkv '

and a.snap_id = b.snap_id

---all Sql_plan [email protected]

SELECT a.instance_number inst,a.optimizer_mode opt_mode,a.optimizer_cost opt_cost,a.module,a.sql_id,

A.plan_hash_value,to_char ((b.begin_interval_time), ' Yyyy/mm/dd HH24:MI:SS ') begin_time

From Dba_hist_sqlstat A, Dba_hist_snapshot B

WHERE sql_id=lower (' D8RJBDATC87PF ')

and a.snap_id=b.snap_id

and A.instance_number=b.instance_number

ORDER by B.begin_interval_time DESC


This article from "on the Road" blog, declined reprint!

Common SQL for Oracle---(3) Check execution Plan

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.