zoukankan      html  css  js  c++  java
  • sql当hints index fast full scan走不了 会走index range scan的情况

    explain plan for 
    select  /*+INDEX_FFS(a t100_idx1)*/ owner  from t100 a where a.owner='TLCBUSER';
    
    select * from table(dbms_xplan.display());
    
    PLAN_TABLE_OUTPUT
    Plan hash value: 4259608525
     
    ----------------------------------------------------------------------------------
    | Id  | Operation            | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
    ----------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT     |           |  3962 | 27734 |    67   (2)| 00:00:01 |
    |*  1 |  INDEX FAST FULL SCAN| T100_IDX1 |  3962 | 27734 |    67   (2)| 00:00:01 |
    ----------------------------------------------------------------------------------
     
    Predicate Information (identified by operation id):
    ---------------------------------------------------
     
       1 - filter("A"."OWNER"='TLCBUSER')
       
     explain plan for 
    select  /*+INDEX_FFS(a t100_idx1)*/ owner ,a.object_name from t100 a where a.owner='TLCBUSER';
    
    select * from table(dbms_xplan.display());
    
    PLAN_TABLE_OUTPUT
    Plan hash value: 1209239783
     
    -----------------------------------------------------------------------------------------
    | Id  | Operation                   | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
    -----------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT            |           |  3962 |   123K|   111   (0)| 00:00:02 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| T100      |  3962 |   123K|   111   (0)| 00:00:02 |
    |*  2 |   INDEX RANGE SCAN          | T100_IDX1 |  3962 |       |    10   (0)| 00:00:01 |
    -----------------------------------------------------------------------------------------
     
    Predicate Information (identified by operation id):
    ---------------------------------------------------
     
       2 - access("A"."OWNER"='TLCBUSER')  
      
  • 相关阅读:
    邮件发送
    生成缩略图
    截取字符串,中文安两个字符处理
    获取客户机MAC地址 根据IP地址 获取机器的MAC地址 / 获取真实Ip地址
    文件操作
    MD5加密 和 自定义加密解密
    Html标签替换(过滤掉html特殊符号)
    .net core 自定义中间件
    querySelector和querySelectorAll
    CSS下背景属性background的使用方法
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349066.html
Copyright © 2011-2022 走看看