同一表空间下的各数据文件使用率:
select t.file_id,tmb ,fmb,max,round((tmb-fmb)/tmb*100) "used%" from
(select file_id,round(sum(bytes/1024/1024)) tmb,round(sum(maxbytes/1024/1024)) max from dba_data_files where tablespace_name='TS_IJX_IDX' group by file_id) t,
(select file_id,round(sum(bytes/1024/1024)) fmb from dba_free_space where tablespace_name='TS_IJX_IDX' group by file_id) f
where t.file_id=f.file_id
/
FILE_ID TMB FMB MAX used%
---------- ---------- ---------- ---------- ----------
24 30548 5450 32768 82
71 13692 972 32768 93
select t.file_id,tmb ,fmb,max,round((tmb-fmb)/tmb*100) "used%" from
(select file_id,round(sum(bytes/1024/1024)) tmb,round(sum(maxbytes/1024/1024)) max from dba_data_files where tablespace_name='TS_IJX_IDX' group by file_id) t,
(select file_id,round(sum(bytes/1024/1024)) fmb from dba_free_space where tablespace_name='TS_IJX_IDX' group by file_id) f
where t.file_id=f.file_id
/
FILE_ID TMB FMB MAX used%
---------- ---------- ---------- ---------- ----------
24 30548 5450 32768 82
71 13692 972 32768 93