Re: Highest table being accessed
Posted in 1998
Susan Elliott (ISG) wrote:
>
> Does any one know how to work out which tables in a database are being
> accessed the most ???
>
> Please advise....
> Thanks in advance
> Suze.
Assuming you're running Informix 7.x, try the following:
database sysmaster
select fname, name, dbsname, tabname,
pagreads+pagwrites pagtots
from sysptprof, syschunks, sysdbspaces, sysptnhdr
where trunc(hex(sysptprof.partnum)/1048576) = chknum
and syschunks.dbsnum = sysdbspaces.dbsnum
and sysptprof.partnum = sysptnhdr.partnum
and (pagreads+pagwrites) != 0
order by 5 desc
I use this as part of a DBA report; all I want to know is the overall
'business' of the table. You could select on " . . pagreads, pagwrites"
to keep those numbers separate if you wish, then alter the 'order by '
accordingly.
Hope this helps!
John Carlson
Informix DBA
WH Smith, Inc.