| SQL> create table t1(a char(1000)) storage( freelists 3);
表已创建。 SQL> set serveroutput on; SQL> exec show_space('T1'); Free Blocks.............................0 <==Number of blocks on freelist Total Blocks............................5 <==Total data blocks in segment Total Bytes.............................20480 <==Total bytes in segment Unused Blocks...........................4 <==Total unused blocks in segment Unused Bytes............................16384 <==Total unused bytes in segment Last Used Ext FileId....................15 <==File id of last used extent Last Used Ext BlockId...................562 <==Block id of last used extent Last Used Block.........................1 <==Last used block in extent |
PL/SQL 过程已成功完成。
有关show_space的进一步使用技巧可参考文献5。以下利用上面得到的数据对segment header block进行dump。
| SQL>alter system dump datafile 15 block 562;
在udump/ora10792.trc中 *** 2004-09-08 15:29:57.343 Start dump data blocks tsn: 27 file#: 15 minblk 562 maxblk 562
buffer tsn: 27 rdba: 0x03c00232 (15/562) scn: 0x0000.064560e4 seq: 0x02 flg: 0x00 tail: 0x60e41002 frmt: 0x02 chkval: 0x0000 type: 0x10=DATA SEGMENT HEADER - UNLIMITED Extent Control Header -----------------------------------------------------------------
Extent Header:: spare1: 0 space2: 0 #extents: 1 #blocks: 4 last map 0x00000000 #maps: 0 offset: 2080 Highwater:: 0x03c00233 ext#: 0 blk#: 0 ext size: 4 #blocks in seg. hdr's freelists: 0 #blocks below: 0 mapblk 0x00000000 offset: 0 Unlocked
Map Header:: next 0x00000000 #extents: 1 obj#: 60033 flag: 0x40000000 Extent Map -----------------------------------------------------------------
0x03c00233 length: 4 nfl = 3, nfb = 1 typ = 1 nxf = 0 SEG LST:: flg: UNUSED lhd: 0x00000000 ltl: 0x00000000 SEG LST:: flg: UNUSED lhd: 0x00000000 ltl: 0x00000000 SEG LST:: flg: UNUSED lhd: 0x00000000 ltl: 0x00000000 SEG LST:: flg: UNUSED lhd: 0x00000000 ltl: 0x00000000 End dump data blocks tsn: 27 file#: 15 minblk 562 maxblk 562 |
对于上述块中字段的说明,以及相关试验。由于篇幅所限,本文不再列举。
更多内容请看PCdog.com--性能调优专题