Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Art S. Kagel — — source: Usenet: comp.databases.informix
Diego Morales wrote:
> Hi to all. I have problems to unload/load a table to set extents
> correctly (I have table with more than 500,000 records and more than 100
> extents). I need to disable foreign keys to unload and load the main
> table but I don’t know how. Please help me.
Diego, you do not have to unload/reload the table to compress the extents.
The following will do it.
1) ALTER TABLE mytable NEXT SIZE <newsize>;
2) ALTER FRAGMENT ON TABLE mytable INIT IN <dbspace or fragmentation
expression>;
The dbspace/expression can be the same one the table already uses as long as
there is space for a 2nd copy of the table temporarily. You should end up
with one or at most 2 extents - assuming the table is smaller than a chunk -
or one per chunk if it is larger unless that dbspace is badly fragmented.
In which case doing this 2x for each table in the dbspace or moving the
table(s) to an empty dbspace will solve that.
Art S. Kagel
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.