kereni
11th June 2003, 16:38
Can some please suggest an SQL script for Informix that will show me a list of all BAAN tables with the number of records, size and extants per table.

Thanks,
kereni

amoshammer
11th June 2003, 17:15
I use session ttaad4222m000 Count Numder of Records by Table
KR
Andreas

Caner.B
12th June 2003, 14:52
Kereni,

You can try these,

if your informix is on Windows change 2 to 4 in the sqls.

select b.tabname,a.nrows,a.npdata*2 data,(a.npused - a.npdata)*2 index, a.npused*2 data_and_index ,a.nptotal*2 disk , a.nextns
from sysmaster:sysptnhdr a , systables b
where b.tabname like '%Your_Company'
and a.partnum= b.partnum

For right results first run update statistics before you run sql below.

select a.tabname, a.nrows , a.npused*2 Npused, sum(b.size*2)Alan ,count(b.tabname) Extent from systables a, sysmaster:sysextents b
where a.tabname like "%your_company" and a.tabname=b.tabname
group by a.tabname,a.npused,a.nrows

Caner