Tables

Problem: Table Compression

How do I compress a table in order to reduce the number of extents and restore them to one contiguous chunk?

Solution: Exports, Alters, or Alter Fragment

There are several ways to do this, depending upon which version of the IDS engine your have.

  • Export the table to a flatfile, drop and rebuild the table, and import the table back into the newly built table.

  • ALTER INDEX TO CLUSTER (requires enough space for a duplicate copy of the table.

  • ALTER FRAGMENT ON TABLE tablename INIT in spacename. This works for later versions of IDS and is the fastest, most efficient method.

Get Informix DBA Survival Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.