Re: extents of tables
Posted in 1998
deeky@my-dejanews.com wrote:
>
> From an Informix newbie:
>
> Can someone tell me how to get a report of the number of extents per table
> (not just system tables but data as well)? I know about onstat -t but this
> output seems kinda cryptic...
>
> I am running 7.24.UC5-1
Sure, several options. You can run oncheck -pe and count the number of
extents per table (you could write a script to do this), you could (as
someone intimated) query sysmaster:sysextents and count the extents by
table, run oncheck -pT which will tell you directly but it needs to
be run for each table. The best solution is to query the sysmaster
table sysptnhdr which has the column nextns (number_extents). You can
join it to systabnames via the partnum columns in each to get the name
of the table and database. Vis:
SELECT dbsname, tabname, nextns
FROM systabnames n, sysptnhdr h
WHERE n.partnum = h.partnum
ORDER BY dbsname, tabname;
Art S. Kagel