[comp.databases] Question about Informix's alter command

sengillo@Kodak.Com (Alan Sengillo) (05/07/91)

-- 

Does anyone know if the alter command in Informix does anything else then just
alter the columns in a table?

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. The problem is the table is large ( > 1,000,000 rows) and
the alter takes over 45 minutes. I want to remove the alter command, but I
want to make sure that the command is not doing anything else then just
reclaiming diskspace. I do not need to reclaim the diskspace since the table
is constantly growing. The deletes are done to remove old data.


|     Alan Sengillo                        PHONE: (716) 726-9716 or 477-3503  |
|  Internet: sengillo@Kodak.Com                                               |
|  USMAIL: Eastman Kodak Co.,   Dept. 698, 2-1-EP,   Rochester NY, 14653-5108 |

das@trac2000.ueci.com (David Snyder) (05/08/91)

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