ITPub博客

首页 > Linux操作系统 > Linux操作系统 > no_merge的含义

no_merge的含义

原创 Linux操作系统 作者:wei-xh 时间:2011-08-01 10:37:40 0 删除 编辑

create table wxh_tbd1 as select * from dba_objects;
create table wxh_tbd2 as select * from dba_objects;

create index ind_oi on wxh_tbd1(object_name);
create index t_22 on wxh_tbd1(object_id);
create index t_23 on wxh_tbd2(object_id);

create view v_tbd2
as
select a.object_id,a.object_name,b.object_type from wxh_tbd1 a,wxh_tbd2 b
where a.object_id=b.object_id;

select /*+ no_merge(d) */* from wxh_tbd1 c,v_tbd2 d
where c.object_id=d.object_id and c.object_name='WXH_TBD';

select * from wxh_tbd1 c,v_tbd2 d
where c.object_id=d.object_id and c.object_name='WXH_TBD';

 

-------------------------------------------------------------------------------------------
| Id  | Operation                      | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
-------------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT               |          |     1 |   131 |     6   (0)| 00:00:01 |
|   1 |  NESTED LOOPS                  |          |       |       |            |          |
|   2 |   NESTED LOOPS                 |          |     1 |   131 |     6   (0)| 00:00:01 |
|   3 |    NESTED LOOPS                |          |     1 |   118 |     4   (0)| 00:00:01 |
|   4 |     TABLE ACCESS BY INDEX ROWID| WXH_TBD1 |     1 |    94 |     2   (0)| 00:00:01 |
|*  5 |      INDEX RANGE SCAN          | IND_OI   |     1 |       |     1   (0)| 00:00:01 |
|   6 |     TABLE ACCESS BY INDEX ROWID| WXH_TBD1 |     1 |    24 |     2   (0)| 00:00:01 |
|*  7 |      INDEX RANGE SCAN          | T_22     |     1 |       |     1   (0)| 00:00:01 |
|*  8 |    INDEX RANGE SCAN            | T_23     |     1 |       |     1   (0)| 00:00:01 |
|   9 |   TABLE ACCESS BY INDEX ROWID  | WXH_TBD2 |     1 |    13 |     2   (0)| 00:00:01 |
-------------------------------------------------------------------------------------------

Statistics
----------------------------------------------------------
          8  recursive calls
          0  db block gets
         36  consistent gets
         21  physical reads
          0  redo size
       2138  bytes sent via SQL*Net to client
        524  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          5  rows processed

-----------------------------------------------------------------------------------------
| Id  | Operation                    | Name     | Rows  | Bytes | Cost (%CPU)| Time     |
-----------------------------------------------------------------------------------------
|   0 | SELECT STATEMENT             |          |     1 |   184 |   132   (2)| 00:00:02 |
|*  1 |  HASH JOIN                   |          |     1 |   184 |   132   (2)| 00:00:02 |
|   2 |   TABLE ACCESS BY INDEX ROWID| WXH_TBD1 |     1 |    94 |     2   (0)| 00:00:01 |
|*  3 |    INDEX RANGE SCAN          | IND_OI   |     1 |       |     1   (0)| 00:00:01 |
|   4 |   VIEW                       | V_TBD2   | 20082 |  1765K|   130   (2)| 00:00:02 |
|*  5 |    HASH JOIN                 |          | 20082 |   725K|   130   (2)| 00:00:02 |
|   6 |     TABLE ACCESS FULL        | WXH_TBD2 | 20151 |   255K|    64   (0)| 00:00:01 |
|   7 |     TABLE ACCESS FULL        | WXH_TBD1 | 20151 |   472K|    64   (0)| 00:00:01 |
-----------------------------------------------------------------------------------------

Statistics
----------------------------------------------------------
          8  recursive calls
          0  db block gets
        568  consistent gets
        552  physical reads
          0  redo size
       2138  bytes sent via SQL*Net to client
        524  bytes received via SQL*Net from client
          2  SQL*Net roundtrips to/from client
          0  sorts (memory)
          0  sorts (disk)
          5  rows processed

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

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

注册时间:2009-07-04

  • 博文量
    422
  • 访问量
    2315251