set ver off; set define on; col owner format a15 col segment_name format a30 col partition_name format a30 define v_fr_owner=&1 ; define v_fr_table=&2; define v_fr_partition=&3; select a.owner,a.segment_name,a.partition_name,round(a.bytes/1024/1024,2) "tamano alocatado (Mb)", round((b.num_rows*b.avg_row_len/1024/1024),2) "tamano real(Mb)", round(a.bytes/1024/1024,2) - round((b.num_rows*b.avg_row_len/1024/1024),2) "tamano reclamable (Mb)", round(((round(a.bytes/1024/1024,2) - round((b.num_rows*b.avg_row_len/1024/1024),2))/round(a.bytes/1024/1024,2))*100,2)"% reclamable", round(b.initial_extent/1024,2) "initial_extent (Kb)",b.pct_free from dba_segments a, dba_tab_partitions b where a.segment_name = b.table_name and a.partition_name = b.partition_name and a.owner = b.table_owner and a.segment_type = 'TABLE PARTITION' and a.owner like upper ('&v_fr_owner') and a.segment_name like upper ('&v_fr_table') and a.partition_name like upper ('&v_fr_partition') order by a.owner,a.segment_name,a.partition_name asc;