What is the difference between access and filter in Oracle execution plan

Source: Internet
Author: User


Prediceate (predicate): where restriction in a query.

In viewing the execution plan information, you will often see two predicates filter and access

, what the difference is, understanding the two words will help us to interpret Oracle's execution plan information.

Simply put, the execution plan, if displayed as access, indicates that the value of this predicate condition will affect the access path (table or index) of the data, while filter indicates that the value of the predicate condition does not affect the data
Access path, only play the role of filtering.

Second, illustrate:

----Create a table echo---- 1Sql> Create TableEcho as Select *  fromdba_objects;2  3 Tablecreated.4  5Sql> SetAutotrace TraceExp; 6Sql> SetLinesize Max; 7Sql> Select *  fromEchowhere object_id= +; 8  9ExecutionPlanTen ---------------------------------------------------------- One PlanHash value:642657756 A  - -------------------------------------------------------------------------- - |Id|Operation|Name|Rows|Bytes|Cost (%CPU)|Time| the -------------------------------------------------------------------------- - |   0 | SELECTSTATEMENT|     |     A |  2484 |   289(1)| xx:xx:Geneva | - |*  1 |  TABLEACCESS Full|ECHO|     A |  2484 |   289(1)| xx:xx:Geneva | - -------------------------------------------------------------------------- +  -predicate information (identified byoperation ID): + --------------------------------------------------- A  at    1 -Filter ("object_id"= +)---because the table echo does not create an index, the execution plan does not have the option of selecting a data access path, and the predicate condition here is just the function of data filtering, so filter is used.  -  -Note - ----- -    -Dynamic sampling used forThis statement ( Level=2) -  ----The case of creating an index---- inSql> Create IndexEcho_ind onEchoobject_id); -  to Indexcreated. +  -Sql> Select *  fromEchowhere object_id= +; the  *ExecutionPlan $ ----------------------------------------------------------Panax Notoginseng PlanHash value:1345159126 -  the ---------------------------------------------------------------------------------------- + |Id|Operation|Name|Rows|Bytes|Cost (%CPU)|Time| A ---------------------------------------------------------------------------------------- the |   0 | SELECTSTATEMENT|           |     1 |   207 |     2(0)| xx:xx: on | + |   1 |  TABLEACCESS by INDEXROWID|ECHO|     1 |   207 |     2(0)| xx:xx: on | - |*  2 |   INDEXRANGE SCAN|Echo_ind|     1 |       |     1(0)| xx:xx: on | $ ---------------------------------------------------------------------------------------- $  -predicate information (identified byoperation ID): - --------------------------------------------------- the  -    2 -Access ("object_id"= +)----the predicate condition affects the path to the data access, and the index is selected, so use Access. Wuyi  theNote - ----- Wu    -Dynamic sampling used forThis statement ( Level=2)

What is the difference between access and filter in Oracle 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.