RE: How to generate Alter Table modify next entent size?
Posted in 1998
Try this:
select "ALTER TABLE ", tabname, " MODIFY NEXT SIZE ",
(round(sum(size) * .10)), ";"
from sysextents
where dbsname = "your_db_name"
and tabname in
(select tabname
from sysextents
where dbsname = "your_db_name"
group by tabname having count(*) > 8)
group by 2
This calculates a next extent size based on 10% of the sum of all extent
sizes for any table having greater than 8 extents. And makes your SQL
statements for you.
Don.
>From: dengelsen@my-dejanews.com
>Sent: Thursday, December 17, 1998 12:58 AM
>To: informix-list@iiug.org
>Subject: How to generate Alter Table modify next entent size?
>Hello,
>How to generate Alter Table modify next entent size?
>Currently I've tables with 100+ extents. I've used the following script
with
>dbaccess to display al tables with 100+ extents.
>select dbsname, tabname, count(*) num_extents
>from sysmaster:systabnames,
> sysmaster:sysptnext
>where partnum = pe_partnum and dbsname = 'baan'
>group by 1,2
>having count(*) > 100
>order by 3 desc;
>Now I want to modify the next extentsizes from these tables. I would like
to
>have a script that produces the following output
>ALTER TABLE tabname MODIFY NEXT SIZE <current NE_VALUE *2>