dba_tables.blocks V$ dba_segments.blocks
时间:2011-03-14 来源:penglele2009
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