A very important point to query the Oracle SQL run plan--dba_hist_sql_plan

Source: Internet
Author: User

The author of the article gave great help to elder withered flourish, in order to express my gratitude.

This applies to the Oracle DB version number, Oracle 10g, or later.

It is important to say that this view is one of the AWRSQRPT reports is not in. is the filter_predicates column.

SELECT Plan_hash_value,

To_char (Rawtohex (child_address)), To_number (child_number), ID, Lpad (", DEPTH) | | Operation operation, Options, Object_owner, object_name, optimizer, cost, Access_predi Cates, filter_predicates from V$sql_plan WHERE sql_id = 'Bkcyk7bf380t6' ORDER by 1, 3, 2, 4; Focus on optimizer column, filter_predicates column.

If the SQL is not in the shared pool, run Sql:set linesize 500set pagesize 500col plan_hash_value format 9999999999col ID format 999 for example: 999col operation format a30col options format a15col object_owner format a15col object_name format a20col optimizer format A15col cost format 9999999999col access_predicates format a15col filter_predicates format A15
SELECT plan_hash_value, ID, Lpad (", DEPTH) | |         Operation operation, Options, Object_owner, object_name, optimizer, cost, Access_predicates, filter_predicates from Dba_hist_sql_plan WHERE sql_id = 'Fahv8x6ngrb50' ORDER by Plan_hash_value, id; Focus on the Filter_predicates column.

-This column can help infer the reason for not taking the index.

If the query result of this column is null, it is normal. If it is not NULL, then it is necessary to pay extra attention to the reason of not being empty. For example, as seen in:

A very important point to query the Oracle SQL run plan--dba_hist_sql_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.