Hi,
I use the following to determine # of extents and # of 4K pages, then ftp the pipe delimited output to Excel & use to obtain initial extent/next extent sizing for table defragging after a dbexport:
{ run this script against the sysmaster database }
unload to "output_file" delimiter "|"
select b.dbsname,
b.tabname,
a.ti_nextns, { total # of extents }
a.ti_nptotal { total # of 4K pages }
from systabinfo a,
systabnames b,
fnupg:systables c { change DB name }
where a.ti_partnum = b.partnum and
a.ti_partnum = c.partnum
and b.dbsname = "fnupg" { change DB name }
and c.tabtype = "T" { make sure it's a table, not an index }
and a.ti_nptotal > a.ti_fextsiz { act. size in KB > initial extent size }
and a.ti_nextns >= 3 { table must have 3 or more extents }
order by a.ti_nptotal desc
Good luck with this, standard disclaimers apply
Mike