zoukankan      html  css  js  c++  java
  • autotrace显示Statistics很多信息为0(转)

    一朋友使用autotrace查看数据库执行计划发现结果如下,Statistics中很多信息为0,这个肯定是不正常现象,什么都可以为0,consistent gets也不可能为0.

    SQL> set autot on
    SQL> select count(*) from RACV_DATA.PARTY_DUMMY;
     
      COUNT(*)
    ----------
            47
     
    Elapsed: 00:00:00.00
     
    Execution Plan
    ----------------------------------------------------------
    Plan hash value: 3621440939
     
    --------------------------------------------------------------------------
    | Id  | Operation          | Name        | Rows  | Cost (%CPU)| Time     |
    --------------------------------------------------------------------------
    |   0 | SELECT STATEMENT   |             |     1 |     3   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE    |             |     1 |            |          |
    |   2 |   TABLE ACCESS FULL| PARTY_DUMMY |    47 |     3   (0)| 00:00:01 |
    --------------------------------------------------------------------------
     
     
    Statistics
    ----------------------------------------------------------
              0  recursive calls
              0  db block gets
              0  consistent gets
              0  physical reads
              0  redo size
              0  bytes sent via SQL*Net to client
              0  bytes received via SQL*Net from client
              0  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              rows processed

    解决方法

    SQL>  select owner,object_name from dba_objects where object_name='PLAN_TABLE';
     
    no rows selected
     
    SQL> @?/rdbms/admin/utlxplan.sql
     
    Table created.

    重新查看Statistics信息

    Statistics
    ----------------------------------------------------------
              0  recursive calls
              0  db block gets
              7  consistent gets
              0  physical reads
              0  redo size
            522  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)
              rows processed

    http://www.xifenfei.com/3306.html

  • 相关阅读:
    新的开始!
    find命令之mtime
    glances服务器监控工具
    centos7最小化安装改为图形界面
    ansible笔记(3)-文件操作模块(上)
    php-fpm参数详解
    ansible笔记(2)-模块简介
    centos创建交换分区
    等保测评三级整改-身份鉴别
    vsftp安装配置
  • 原文地址:https://www.cnblogs.com/softidea/p/3949804.html
Copyright © 2011-2022 走看看