ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 一个表的bytes

一个表的bytes

原创 Linux操作系统 作者:guo_li_yuan 时间:2008-01-22 14:18:26 0 删除 编辑

                                dba_segments,dba_extents  dba_tables

                               

create table T1
(
  ID   NUMBER,
  NAME VARCHAR2(10)
)
tablespace USERS

blocks       bytes                     extent
   8              65536                   1          

////////////////////////////////////////////////////////
DECLARE
                 x number :=0;
                BEGIN
                               for i in 1..50000 LOOP
                                        insert into t1 values  (i,i+1);
                                        x :=x  +1;  

                                        if x > 50 then

                                        commit;
                                        x :=0;
                              end if; 
                   End Loop; 
                   commit; 
                   END;
////////////////////////////////////////////////////////////    50000  是个变的值  80000 时候做比较
select owner,segment_name,segment_type,header_file,bytes,blocks,extents from dba_segments where segment_name='T1';          (50000)

         owner      segment_name        segment_type    header_file              bytes                blocks           extents     
 
         scott         T1                                table                       4                            983040              120                 15             120=15*8

select     *     from   dba_extents     where segment_name='T1'      查看各个extent 信息 

select owner,segment_name,segment_type,header_file,bytes,blocks,extents from dba_segments where segment_name='T1';         (80000)

         owner      segment_name        segment_type    header_file              bytes                blocks           extents      

         scott         T1                                table                       4                           2097152                256              17             256<>17*8


select owner,segment_name,segment_type, extent_id, file_id,block_id, bytes,blocks    from dba_extents where segment_name='T1'    查看各个extent 信息 

1                                          segment_name                        extentd_id                                                     bytes                      blocks
.......
14                         SCOTT                 T1             TABLE                   13          4            2145                        65536                   8
15                        SCOTT                  T1             TABLE                    14         4            2153                         65536                   8
16                        SCOTT                  T1             TABLE                    15         4             2161                        65536                   8
17                        SCOTT                  T1             TABLE                    16         4             3209                        
1048576              128              (说明第17个extent 128个block大)

                                    ALL_tables     列 NUM_ROWS , BLOCKS(Number of used data blocks in the table) 

                  问题 ?  查到 all_tables 中  T1  行 该两列值为空的 不知道为什么

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

上一篇: metalink文章统计
下一篇: 10g expdp
请登录后发表评论 登录
全部评论

注册时间:2008-01-04

  • 博文量
    11
  • 访问量
    18378