欢迎投稿

今日深度:

access and filter,accessfilter

access and filter,accessfilter


access:表示这个谓词条件的值将会影响数据的访问路径(表还是索引)。

filter:表示谓词条件的值并不会影响数据访问路径,只起到过滤的作用

----创建一张表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 (%CPU)| Time     |
--------------------------------------------------------------------------
|   0 | SELECT STATEMENT  |     |    12 |  2484 |   289   (1)| 00:00:04 |
|*  1 |  TABLE ACCESS FULL| ECHO |    12 |  2484 |   289   (1)| 00:00:04 |
--------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   1 - filter("OBJECT_ID"=1000)  ----因为表echo没有创建索引,执行计划没有选择数据访问路径的余地,谓词条件在这里只是起到数据过滤的作用,所以使用了filter。

Note
-----
   - dynamic sampling used for this statement (level=2)

 ----创建索引的情况----
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

----------------------------------------------------------------------------------------
| Id  | Operation            | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
----------------------------------------------------------------------------------------
|   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 |
----------------------------------------------------------------------------------------

Predicate Information (identified by operation id):
---------------------------------------------------

   2 - access("OBJECT_ID"=1000)  ----谓词条件影响到数据访问的路径,选择了索引,所以用access。

Note
-----
   - dynamic sampling used for this statement (level=2)

以上转自网络

关于access的谓词信息要格外注意,把自己当成优化器,要明白为什么谓词条件会这样影响访问路径。

没有索引就没有选择余地了,那谓词条件一定不会觉得访问路径,那只能是filter的了。对于filter,下面只有一个节点一般仅仅是起到过滤的作用,但是多余两

个节点基本上会涉及到被驱动表可能处于驱动表的循环中,一般可以通过改写sql的方式避免。


Filter access 神马意思?

distance function of the kind of casting
这种铸件的距离函数
Elevateur access
升降功能使用
Abarasive cleaner access
研磨料清洁器功能使用
Filter access
过滤功能使用
Etancheity on the roof: how it's done?
顶部密封性:它是如何实现的?
Supply management in shots Alarm
发射供给管理 警报
 

access 中filter 的使用方法

office.microsoft.com/...2.aspx
 

www.htsjk.Com true http://www.htsjk.com/shujukunews/2772.html NewsArticle access and filter,accessfilter access:表示这个谓词条件的将会影响数据的访问路径(表还是索引)。 filter:表示谓词条件的并不会影响数据访问路径,只起到过滤的作用 。 ----创建一张表echo---...
评论暂时关闭