kereni
8th December 2002, 15:06
Hi there,
I'm looking for Informix extents check tool (script) that can give me an information about number of extents and size of tables.
thanks
Neal Matthews
9th December 2002, 11:09
I use the script below to show me tables with more than 8 extents and recommend first and next extent sizes. Hope it helps.
Regards
Neal Matthews
Intier Automotive - IT Support Analyst
select substr(tabname,1,12) tab,
count(*) num_of_exts,
round(sum(pe_size)
* 2 {Systems page size in KB}
* 1.2 {Add 20% growth factor})
proposed_ext_size, {First extent size in kb}
round(sum(pe_size)
* 2 {Systems page size in KB}
* 0.2 {Estimated 20% yearly growth})
next_ext_size {Next extent size in kb}
from systabnames stn,
sysptnext sti
where
stn.partnum = sti.pe_partnum and
stn.tabname >= 'tcpaaa000000' and stn.tabname <= 'ttuzzz999999'
group by 1
having count(*) > 8
order by 2 desc, 3 desc;
kereni
11th December 2002, 10:52
Hi,
Thanks for the reply. But its look like I have some problem to execute the sql script. I'm using dbaccess to execute the sql I getting syntax errors.
Thanks,
kereni
Neal Matthews
12th December 2002, 09:44
What sort of syntax errors are you getting ?
Cheers
Neal Matthews
Intier Automotive - IT Support Analyst
kereni
12th December 2002, 11:27
When I'm trying to execute the sql via dbaccess I get this error:
674: Procedure (substr) not found.
Neal Matthews
12th December 2002, 11:34
Try it with the substr taken out;
select tabname tab,
Cheers
Neal
kereni
12th December 2002, 11:38
Thanks for your quick reply.
kereni
Neal Matthews
12th December 2002, 11:49
Excellent.
One further point when editing the inf_storage file I have to double the extent sizes recommended by the report.
I believe the syntax in inf_storage shows kb and the script shows kb and I never really had the chance to check out why I had to do this (obviously something to do with 2k pages).
Anyway fiddle around with a table from your test company and see how you get on.
Cheers
Neal