zoukankan      html  css  js  c++  java
  • Oracle 执行计划了的rows概念

    alter session set statistics_level=all; 
    select t1.* from t1,t2 where t1.id=t2.id and t1.id<3;
    select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS LAST')); 
    
    SQL> select * from table(dbms_xplan.display_cursor(null,null,'ALLSTATS LAST')); 
    
    PLAN_TABLE_OUTPUT
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    SQL_ID	4uuk2mdgh036f, child number 0
    -------------------------------------
    select t1.* from t1,t2 where t1.id=t2.id and t1.id<3
    
    Plan hash value: 1106359941
    
    --------------------------------------------------------------------------------------------------
    | Id  | Operation		     | Name    | Starts | E-Rows | A-Rows |   A-Time   | Buffers |
    --------------------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT	     |	       |      1 |	 |    131K|00:00:00.34 |   37856 |
    |   1 |  NESTED LOOPS		     |	       |      1 |      2 |    131K|00:00:00.34 |   37856 |
    |   2 |   TABLE ACCESS BY INDEX ROWID| T1      |      1 |      3 |    131K|00:00:00.11 |   20376 |
    |*  3 |    INDEX RANGE SCAN	     | T1_IDX1 |      1 |      3 |    131K|00:00:00.04 |    9392 |
    |*  4 |   INDEX RANGE SCAN	     | T2_IDX1 |    131K|      1 |    131K|00:00:00.17 |   17480 |
    --------------------------------------------------------------------------------------------------
    
    Predicate Information (identified by operation id):
    ---------------------------------------------------
    
       3 - access("T1"."ID"<3)
       4 - access("T1"."ID"="T2"."ID")
           filter("T2"."ID"<3)
    
    
    已选择23行。
    
    
    SQL> select count(*) from t1 where t1.id<3;
    
      COUNT(*)
    ----------
        131072
    
    
    A-Rows 真实返回的记录数
    
     E-Rows Oracle预估的返回记录数

  • 相关阅读:
    生产者消费者模型
    varchar2存储汉字,英文字符,数字在oracle中的多少
    正则表达式以及邮箱
    爬虫
    创建git本地仓库和GitHub远程仓库并配置连接的从无到有
    CSSHTML实现高度宽度自适应
    实现一个元素在当前窗口垂直水平居中的几种方法
    angular4 rxjs 异步处理多个http请求数据
    angular 4 父子组件异步交互
    同步异步单线程多线程初级理解
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13350708.html
Copyright © 2011-2022 走看看