create table test(
  num_ID                 NUMBER(22) not null,   ---建立索引
  PRIORITY           NUMBER(3) not null,
  CREATE_TIME             DATE ,                  ---建立索引
  FINISH_TIME             DATE                    ---建立索引)怎么由表面查出这个表索引的大小?

解决方案 »

  1.   

    select bytes from dba_segments where segment_name='索引名字'
      

  2.   


    --------具体点的。。
    select bytes
      from dba_segments s
     where s.segment_name in
           (select i.index_name from dba_indexes i where i.table_name = 'TEST');
      

  3.   

    从user_indexes 和dba_indexes表自己desc后,查查吧,看有没有byte字段。
      

  4.   

    查看索引占用空间大小:
    select (sum(bytes)/1024/1024)||'MB' from dba_segments where segment_name = 'INDBILLLOG5_CALLEND';查看表占用空间大小
    select (sum(bytes)/1024/1024)||'MB' from dba_segments where segment_name = 'TBILLLOG5';Oracle 索引的维护
    http://blog.csdn.net/tianlesoftware/archive/2010/06/19/5680706.aspx
      

  5.   


    SELECT S.SEGMENT_NAME, S.BYTES / 1024 / 1024 || 'MB' AS BYTES
      FROM DBA_SEGMENTS S
     WHERE S.SEGMENT_NAME IN
           (SELECT I.INDEX_NAME
              FROM DBA_INDEXES I
             WHERE I.TABLE_NAME = test');
      

  6.   

    segment里可以查询 索引,表的大小。