Re: Question about Informix's alter command
Answered: amber (solid confidence) — Message quotes the full original ALTER TABLE/disk-reclaim question and gives a direct, technically correct answer, including a concrete better alternative (ALTER INDEX ... TO CLUSTER); not confirmed by the asker.
Advisory only.
Posted in 1991
Path: emory!wuarchive!uunet!trac2000!das
From: das@trac2000.ueci.com (David Snyder)
Newsgroups: comp.databases
Keywords: informix alter
Message-ID: <1018@trac2000.ueci.com>
Date: 8 May 91 13:20:53 GMT
References: <1991May7.142132.24212@kodak.kodak.com>
Organization: UE&C - Catalytic in Philadelphia, PA
In article <1991May7.142132.24212@kodak.kodak.com>, sengillo@Kodak.Com (Alan Sengillo) writes:
>
> Does anyone know if the alter command in Informix does anything else then just
> alter the columns in a table?
>
Other than copying the old table to the new table (which will drop empty slots),
no.
> I am maintaining a program that after it delete rows from the database it
> does an alter on the table. It seems that the alter is being done just to
> reclaim diskspace.
>
Thats probably not the best way to reclaim disk space, especially if your
file keeps growing. Get rid of the ALTER TABLE.
BTW, if you do need to reclaim disk space, try:
ALTER INDEX idxname TO CLUSTER;
Not only will that reclaim disk space, but you'll get better performance from
indexed queries based on the clustered index.
DAS
--
David A. Snyder @ UE&C - Catalytic in Philadelphia, PA
UUCP: ..!uunet!trac2000!das INTERNET: das@trac2000.ueci.com