Oracle执行分析详细(三)

2014-11-24 16:18:24 · 作者: · 浏览: 10
  • -------------------------------------------------------------------------------
  • | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | -------------------------------------------------------------------------------
  • | 0 | SELECT STATEMENT | | 107 | 7276 | 3 (0)| 00:00:01 | | 1 | TABLE ACCESS FULL| EMPLOYEES | 107 | 7276 | 3 (0)| 00:00:01 |
  • -------------------------------------------------------------------------------
  • Statistics
  • ---------------------------------------------------------- 0 recursive calls
  • 0 db block gets 15 consistent gets
  • 0 physical reads 0 redo size
  • 9997 bytes sent via SQL*Net to client 569 bytes received via SQL*Net from client
  • 9 SQL*Net roundtrips to/from client 0 sorts (memory)
  • 0 sorts (disk) 107 rows processed
  • SQL> select * from employees;
    
    107 rows selected.
    
    
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 1445457117
    
    -------------------------------------------------------------------------------
    | Id  | Operation         | Name      | Rows  | Bytes | Cost (%CPU)| Time     |
    -------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT  |           |   107 |  7276 |     3   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| EMPLOYEES |   107 |  7276 |     3   (0)| 00:00:01 |
    -------------------------------------------------------------------------------
    
    
    Statistics
    ----------------------------------------------------------
              0  recursive calls
              0  db block gets
             15  consistent gets
              0  physical reads
              0  redo size
           9997  bytes sent via SQL*Net to client
            569  bytes received via SQL*Net from client
              9  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
            107  rows processed
     

    在第一次查询employees时,产生了1次recursive Call,第二次查询的时候,因为数据字典的信息信息已经放在cache里,所以第二次的recursive call 为0. 如果第二次也没有完全cache,那么也是会产生recursive call,但次数比第一次少。

    其他的从字面上面就可以看出来了,不需要多解释了吧。