Access and filter, accessfilter

Source: Internet
Author: User

Access and filter, accessfilter

Access: indicates that the value of this predicate condition will affect the data access path (table or index ).

Filter: indicates that the value of the predicate condition does not affect the data access path and only filters data.

---- Create a table echo ---- SQL> create Table echo as select * from dba_objects; table created. SQL> set autotrace trace exp; SQL> set linesize 150; SQL> select * from echo where object_id = 1000; Execution Plan -------------------------------------------------------- Plan hash value: 642657756 -------------------------------------------------------------------------- | Id | Operation | Name | Rows | Bytes | Cost (% CP U) | Time | ------------------------------------------------------------------------------ | 0 | select statement | 12 | 2484 | 289 (1) | 00:00:04 | * 1 | table access full | ECHO | 12 | 2484 | 289 (1) | 00:00:04 | identified Predicate Information (identified by operation id ): --------------------------------------------------- 1-filter ("OBJEC T_ID "= 1000) ---- because the table echo does not create an index, there is no room to select the data access path for the execution plan. The predicate condition is used only for data filtering, so the filter is used. Note ------dynamic sampling used for this statement (level = 2) ---- create an index ---- SQL> create Index echo_ind on echo (object_id); index created. SQL> select * from echo where object_id = 1000; Execution Plan ------------------------------------------------------------ Plan hash value: 1345159126 bytes | Id | Operation | Name | Rows | Bytes | Cost (% CPU) | Time | Bytes | 0 | select statement | 1 | 207 | 2 (0) | 00:00:01 | 1 | table access by index rowid | ECHO | 1 | 207 | 2 (0) | 00:00:01 | * 2 | index range scan | ECHO_IND | 1 | 1 (0) | 00:00:01 | predict Predicate In Formation (identified by operation id): ------------------------------------------------- 2-access ("OBJECT_ID" = 1000) ---- the predicate condition affects the data access path. The index is selected, so access is used. Note ------dynamic sampling used for this statement (level = 2)

Above
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.