Managing Space Schema Obj
main monitor ddl objects dml stato e configurazione rman & dpump pl/sql cluster ASM
main config start-shut process memory monitor diag
user rman & dpump pl/sql cluster ASM
Table of Contents

Tables Fragmentation

set line 200 pages 5000
select 
   table_name,round((blocks*8),2)/1024 "size (MB)" , 
   round((num_rows*avg_row_len/1024/1024),2) "actual_data (MB)",
   (round((blocks*8),2) - round((num_rows*avg_row_len/1024),2))/1024 "wasted_space (MB)"
from 
   dba_tables
where 
   (round((blocks*8),2) > round((num_rows*avg_row_len/1024),2))
-- and OWNER='&owner'
-- and TABLESPACE_NAME=&tbs'
-- and TABLE_NAME='&table'
order by 4 desc;
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License