System Architecture 2-117
Next Extent Allocation
Next Extent Allocation
When an extent fills, OnLine attempts to allocate another extent of
contiguous disk space.
Extent information is tracked as one component of the tblspace tblspace
information for a table. The maximum number of extents allocated for any
tblspace is application- and machine-dependent since it varies with the
amount of space available on the tblspace tblspace entry. (Refer to
page 2-104.)
The number of kilobytes OnLine allocates for a next extent is, in general,
equal to the size of a next extent, as specified in the SQL statement CREATE
TABLE
. However, the actual size of the next extent allocation may deviate
from the specified size because the allocation procedure takes into account
three factors:
■ Number of existing extents for this tblspace
■ Availability of contiguous space in the chunk and dbspace
■ Location of existing tblspace extents
The effect of each of these factors on next extent allocation is explained in the
paragraphs that follow and in Figure 2-24 on page 2-119.
If a tblspace already has 64 extents allocated, OnLine automatically doubles
the size of the next extent and attempts to allocate this doubled size for the
65th extent, and every next extent thereafter, up to the 128th next extent.
Automatic doubling of the next extent size occurs at every multiple of 64
(for example, 128, 192, 256). This feature reduces the number of extents
needed to store data for large tables.
If OnLine cannot find available contiguous space in the first chunk equal to
the size specified for the next extent, it extends the search into the next chunk
in the dbspace. Extents are not allowed to span chunks.
If OnLine cannot find adequate contiguous space anywhere in the dbspace,
it allocates to the table the largest available amount of contiguous space. (The
minimum allocation is four pages. The default value is eight pages.) No error
message is returned if an allocation is possible, even when the amount of
space allocated is less than the requested amount.