RE: Reorg table
Posted in 2005
I use it all the time for reducing extents or moving a table to another
dbspace. Beware of large tables causing long transaction rollback though.
Regards
Colin
>From: "Hamilton, Jerry" <hamiltoj@fleishman.com>
>To: <informix-list@iiug.org>
>Subject: Reorg table
>Date: Thu, 9 Jun 2005 11:22:18 -0500
>
>For years we've been reorging tables the old-fashion way of: unloading
>the table, capturing the views, creating the table and index DDL,
>resizing the table, reloading the table, reindexing, rebuilding the
>stats, etc.,etc., etc..
>
>We've recently started using the "ALTER FRAGMENT" approach of altering
>the table:
>
>alter table "psoft8".ps_pc_dist_tmpl next size 360;
>alter fragment on table "psoft8".ps_pc_dist_tmpl init in syswork;
>alter fragment on table "psoft8".ps_pc_dist_tmpl init in pclarge;>
>Gets rid of all the extents and runs really fast. The only thing we're
>manually doing is dropping the indexes before the alter and recreating
>them after. The views stay in place as do the stats on the table
>
>Internally to Informix, is this approach of altering a table to clean up
>extents any different to the unload/reload approach?
>
>Thanks
>
sending to informix-list