ITPub博客

首页 > Linux操作系统 > Linux操作系统 > show_space解释

show_space解释

原创 Linux操作系统 作者:dragondb 时间:2019-04-21 20:33:07 0 删除 编辑

show_space输出参数的含义......


SQL> create table test(c1 int,c2 varchar2(2000));

Table created.

SQL> insert into test
2 values(1,rpad('a',2000,'a'));

1 row created.

SQL> commit;

Commit complete.

SQL> exec show_space('test');
****************************************************
Free Blocks.............................1
Total Blocks............................16
Total Bytes.............................65536
Unused Blocks...........................14
Unused Bytes............................57344
Last Used Ext FileId....................10
Last Used Ext BlockId...................17
Last Used Block.........................2
****************************************************

PL/SQL procedure successfully completed.

SQL> insert into test
2 values(1,rpad('a',2000,'a'));

1 row created.

SQL> commit;

Commit complete.

SQL> select dbms_rowid.rowid_block_number(rowid) row_num ,c1
2 from test;

ROW_NUM C1
---------- ----------
18 1
19 1

SQL> exec show_space('test');
****************************************************
Free Blocks.............................1
Total Blocks............................16
Total Bytes.............................65536
Unused Blocks...........................13
Unused Bytes............................53248
Last Used Ext FileId....................10
Last Used Ext BlockId...................17
Last Used Block.........................3
****************************************************

PL/SQL procedure successfully completed.

SQL> insert into test
2 values(1,rpad('a',2000,'a'));

1 row created.

SQL> commit;

Commit complete.

SQL> select dbms_rowid.rowid_block_number(rowid) row_num ,c1
2 from test;

ROW_NUM C1
---------- ----------
18 1
19 1
20 1

SQL> exec show_space('test');
****************************************************
Free Blocks.............................1
Total Blocks............................16
Total Bytes.............................65536
Unused Blocks...........................12
Unused Bytes............................49152
Last Used Ext FileId....................10
Last Used Ext BlockId...................17
Last Used Block.........................4
****************************************************

PL/SQL procedure successfully completed.

SQL> analyze table test compute statistics;

Table analyzed.

SQL> select owner,table_name, tablespace_name, blocks, empty_blocks
2 from dba_tables
3 where owner='TEST' ;

OWNER TABLE_NAME
------------------------------ ------------------------------
TABLESPACE_NAME BLOCKS EMPTY_BLOCKS
------------------------------ ---------- ------------
TEST TEST
TEST 3 12

*******************************************

Free Blocks:进入Free list block个数

Unused Blocks:空闲块个数

Last Used Ext BlockId:最后Extent 首个block id

Last Used Block:最后Extent最后实用的block

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

上一篇: 1752年的9月
请登录后发表评论 登录
全部评论

注册时间:2003-05-05

  • 博文量
    98
  • 访问量
    94094