col segment_name format a30 select owner, segment_name, sum(bytes) from dba_segments where tablespace_name=''数据表空间名'' and segment_type=''INDEX'' group by owner,segment_name / |
set linesize 100 col owner format a10 col segment_name format a30 col tablespace_name format a30 select count(*), owner, segment_name, tablespace_name from dba_extents where segment_type=''INDEX'' and owner not in (''SYS'',''SYSTEM'') group by owner,segment_name,tablespace_name having count(*) >10 order by count(*) desc / |
set linesize 120 col "INDEX" format a30 col "TABLESPACE" format a20 select owner "OWNER", segment_name "INDEX", tablespace_name "TABLESPACE", bytes "BYTES/COUNT", sum(bytes) "TOTAL BYTES", round(sum(bytes)/(1024*1024),0) "TOTAL M", count(bytes) "TOTAL COUNT" from dba_extents where segment_type=''INDEX'' and segment_name in ( ''索引名1'', ''索引名2'', ) group by owner,segment_name,segment_type,tablespace_name,bytes order by owner,segment_name / |
select round(bytes/(1024*1024),2) free(M) from sm$ts_free where tablespace_name=''表空间名'' / |
alter index 索引名 rebuild tablespace 索引表空间名 storage(initial 初始值 next 扩展值) nologging / |
select * from dba_extents where segment_name=''索引名'' / |
select * from dba_ind_columns where index_name like ''表名%'' / |
select * from ''表名%'' where / |