ITPub博客

首页 > Linux操作系统 > Linux操作系统 > disable or 扩展

disable or 扩展

原创 Linux操作系统 作者:wei-xh 时间:2011-08-01 11:27:32 0 删除 编辑

SQL> select /*+ use_concat */ * from hao2 where object_id=1 or object_id=2 or object_id=3;


执行计划
----------------------------------------------------------
Plan hash value: 2739802529

----------------------------------------------------------------------------------------
| Id  | Operation                    | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
----------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT             |         |     3 |   282 |     5   (0)| 00:00:01 |
|   1 |  INLIST ITERATOR             |         |       |       |            |          |
|   2 |   TABLE ACCESS BY INDEX ROWID| HAO2    |     3 |   282 |     5   (0)| 00:00:01 |
|*  3 |    INDEX RANGE SCAN          | HAO2IND |     3 |       |     4   (0)| 00:00:01 |
----------------------------------------------------------------------------------------

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

   3 - access("OBJECT_ID"=1 OR "OBJECT_ID"=2 OR "OBJECT_ID"=3)


统计信息
----------------------------------------------------------
          0  recursive calls
          0  db block gets
          9  consistent gets
          0  physical reads
          0  redo size
       1249  bytes sent via SQL*Net to client
        338  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          2  rows processed

SQL> alter session set events '10157 trace name context forever';

会话已更改。

SQL> select /*+ use_concat */ * from hao2 where object_id=1 or object_id=2 or object_id=3;


执行计划
----------------------------------------------------------
Plan hash value: 1202901203

----------------------------------------------------------------------------------------
| Id  | Operation                    | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
----------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT             |         |     3 |   282 |     6   (0)| 00:00:01 |
|   1 |  CONCATENATION               |         |       |       |            |          |
|   2 |   TABLE ACCESS BY INDEX ROWID| HAO2    |     1 |    94 |     2   (0)| 00:00:01 |
|*  3 |    INDEX RANGE SCAN          | HAO2IND |     1 |       |     1   (0)| 00:00:01 |
|   4 |   TABLE ACCESS BY INDEX ROWID| HAO2    |     1 |    94 |     2   (0)| 00:00:01 |
|*  5 |    INDEX RANGE SCAN          | HAO2IND |     1 |       |     1   (0)| 00:00:01 |
|   6 |   TABLE ACCESS BY INDEX ROWID| HAO2    |     1 |    94 |     2   (0)| 00:00:01 |
|*  7 |    INDEX RANGE SCAN          | HAO2IND |     1 |       |     1   (0)| 00:00:01 |
----------------------------------------------------------------------------------------

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

   3 - access("OBJECT_ID"=1)
   5 - access("OBJECT_ID"=3)
   7 - access("OBJECT_ID"=2)


统计信息
----------------------------------------------------------
          0  recursive calls
          0  db block gets
          9  consistent gets
          0  physical reads
          0  redo size
       1249  bytes sent via SQL*Net to client
        338  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          2  rows processed

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22034023/viewspace-703664/,如需转载,请注明出处,否则将追究法律责任。

上一篇: push_pred用法
下一篇: 分区统计信息
请登录后发表评论 登录
全部评论
Oracle ACE组成员,DBGeeK用户组发起人。曾在DTCC、ORACLE技术嘉年华、Gdevops等公开场合做过数据库技术专题分享,2017年应Oracle邀请在世界最大的数据库会议OOW上做技术分享。组织翻译了《拨云见日,解密Oracle ASM内核》一书。

注册时间:2009-07-04

  • 博文量
    422
  • 访问量
    2315402