2-118 IBM Informix OnLine Database Server Administrator’s Guide
Next Extent Allocation
If the disk space allocated for a next extent is physically contiguous with disk
space already allocated to the same table, OnLine allocates the disk space but
does not consider the new allocation as a separate extent. Instead, OnLine
extends the size of the existing contiguous extent. Thereafter, all OnLine disk
space reports reflect the allocation as an extension of the existing extent. That
is, the number of extents reported by OnLine is always the number of physi-
cally distinct extents, not the number of times a next extent has been allocated
plus one (the initial extent).
Once disk space has been allocated to a tblspace as part of an extent, that
space remains dedicated to the tblspace. Even if all extent pages become
empty as a result of deleting data, the disk space remains unavailable for use
by other tables.
As OnLine administrator, you can reclaim the disk space in empty extents
and make it available to other users by rebuilding the table. You can accom-
plish this rebuilding in either one of two ways:
■ If the table with the empty extents includes an index, you can execute
the ALTER INDEX statement with the TO CLUSTER keywords.
Clustering an index rebuilds the table in a different location within
the dbspace. Any extents that remain completely empty after
rebuilding the table are freed and reentered onto the chunk free-list
page.
■ If the table does not include an index, you can unload the table, re-
create the table (either in the same dbspace or in another), and reload
the data using OnLine utilities or the UNLOAD and LOAD state-
ments. (For further information about selecting the correct utility or
statement to use, refer to page 4-57.)