Dba_hist_ SQL _plan is an important view for querying the execution plan of oraclesql.

Source: Internet
Author: User

Dba_hist_ SQL _plan is an important view for querying the execution plan of oraclesql.

I would like to express my gratitude for the help of elders who have prepared this article.

The applicable oracle database version is oracle 10 Gb or later.

This view is important because one column in this view is not found 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, options, object_owner, object_name, optimizer, cost, access_predicates, filter_predicates from v $ SQL _PLAN WHERE SQL _id = 'bkcyk7bf1_t6 'ORDER BY 1, 3, 2, 4; Focus on the optimizer column and the filter_predicates column. If this SQL statement is not in the shared pool, run the following SQL statement: set linesize 500 set pagesize 500 col plan_hash_value format 9999999999 col id format 999999 col operation format a30 col options format a15 col object_owner format a15 col object_name format a20 col optimizer format a15 col cost format 9999999999 col access_predicates format a15 col filter_predicates format a15
SELECT plan_hash_value, id, LPAD ('', DEPTH) | 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 you determine why indexes are not taken away. If the query result of this column is null, it is normal. If it is not null, you need to pay attention to the reason for not being null, 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.