ITPub博客

首页 > 数据库 > Oracle > dba_tables.blocks V$ dba_segments.blocks

dba_tables.blocks V$ dba_segments.blocks

原创 Oracle 作者:penglele2009 时间:2011-03-14 11:40:29 0 删除 编辑

dba_tables.blocks V$ dba_segments.blocks

1:表的分析统计信息不全,导致dba_tables信息出错。


SQL> select count(*) from TESTSIZE;

COUNT(*)
----------
584576

SQL> select table_name,blocks,empty_blocks from dba_tables where owner='HXG';

TABLE_NAME BLOCKS EMPTY_BLOCKS
------------------------------ ---------- ------------
TESTSIZE

SQL>

BLOCKS,EMPTY_BLOCKS居然都是空值!

SQL> select segment_name,blocks from dba_segments where owner='HXG';

SEGMENT_NAME
--------------------------------------------------------------------------------
BLOCKS
----------
TESTSIZE
8064

SQL>analyze table TESTSIZE compute statistics;

SQL> select segment_name,blocks from dba_segments where owner='HXG';

SEGMENT_NAME
--------------------------------------------------------------------------------
BLOCKS
----------
TESTSIZE
8064


SQL> select table_name,blocks,empty_blocks from dba_tables where owner='HXG';

TABLE_NAME BLOCKS EMPTY_BLOCKS
------------------------------ ---------- ------------
TESTSIZE 7873 191


7873 + 191 = 8064

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/aicon/archive/2010/02/23/5319564.aspx

[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22934571/viewspace-1047247/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-11-26

  • 博文量
    199
  • 访问量
    677245