Re: Table Sizes
Posted in 1998
Miles Palmer wrote:
>
> Is there an accurate, proven way to compute the size(in bytes) of each
> table in a database?
>
> Thanks in advance.
You are probably going to get half a bazillion responses to this...
BUT, you can get pretty much all you need with some simple selects on the
sysmaster database...
Something like,
select dbsname, tabname, ti_nptotal*2 tot_kb,
ti_npused*2 kb_used, ti_npdata*2 kb_data,
ti_nextns num_extents
from systabnames, systabinfo
where partnum=ti_partnum
order by 1,3 desc
will give you the total size in kb, the amount of that which is used for data or
indexes, the amount used strictly for data, and - just for kicks - the number of
extents. All this will be sorted by database name and then by size in
descending order. That ought to keep ya busy ;-)
Besides that, check out all the excellent tips and techs regarding sysmaster at
Lester Knutsen's site for the Washington Area Informix User's Group. URL is
<http://www.iiug.org/~waiug>. Besides, you can't go wrong with a guy whose name
ends with 'sen' ;-).
Take Care,
Chuck Ludwigsen.
Memphis Informix User's Group.