A very important view when querying the execution plan of Oracle SQL--dba_hist_sql_plan

Source: Internet
Author: User

The writing of this article has been greatly helped by the withered flourish elders, and I would like to express my thanks.

The Oracle DB version that this article applies to is Oracle 10g or later.

This view is important because there is a column in the view that is not in the AWRSQRPT report. This column 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, instead perform the following sql:set linesize 500set pagesize 500col plan_hash_value format 9999999999col ID format 99999 9col operation format a30col options format a15col object_owner format a15col object_name format a20col optimizer format a 15col 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;  focuses on filter_predicates column. -This column can help you determine why you are not going to index. If the query result of this column is null, it is normal. If it is not NULL, then additional attention is required to the cause of not being empty, as shown in:
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.