— part_col_stats
— mdw 21/03/2003
— more detailed info on cols
col owner            form a6 word wrap
col table_name       form a10 word wrap
col partition_name   form a10 word wrap
col column_name      form a22 word wrap
col num_vals         form 999,999,999
col dnsty            form 0.9999
col num_nulls        form 999,999,999
col avg_l            form 9,999
break on owner nodup on table_name nodup on partition_name nodup
set lines 100
spool part_col_counts.lst
select owner
      ,num_distinct num_vals
      ,density dnsty
      ,avg_col_len avg_l
from dba_part_col_statistics
where owner            like upper(‘&tab_own’||’%’)
and   table_name       like upper(nvl(‘&tab_name’,’WHOOPS’)||’%’)
and   partition_name   like upper(‘&part_name’||’%’)
and   column_name      like upper(‘&col_name’||’%’)
ORDER BY 1,2,3,4
clear colu
spool off
clear breaks
set lines 80