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')  
      
  • 相关阅读:
    截图片
    C#根据字节数截取字符串
    学习ObjectiveC: 入门教程
    [原]32位libusb
    [转]vim下鼠标右键无法复制的解决
    [原]c语言问号表达式
    [转]Linux下的帧缓冲lcd应用编程及Framebuffer驱动程序模型
    [转] android移植详解
    [转]Linux 串口编程
    curl 使用代理
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349066.html
Copyright © 2011-2022 走看看