Extent Size Options
Element | Description | Restrictions | Syntax |
---|---|---|---|
first_kilobytes | Length in kilobytes of the first extent for the index | Must return a positive number; maximum is the chunk size, in kilobytes | Expression |
next_kilobytes | Length in kilobytes of each subsequent extent | Same as for first_kilobytes | Expression |
The minimum length of first_kilobytes (and of next_kilobytes) is four times the disk-page size on your system. For example, if you have a 2-kilobyte page system, the minimum length is 8 kilobytes.
If you need to revise the extent sizes of an index, you can modify the extent and next-extent sizes in the generated schema files of an unloaded table. For example, to make a database more efficient, you might drop an index, modify the extent sizes in the schema files, and then create a new index. For information about how to optimize extents, see your Informix® Administrator's Guide.
Only
extent size values that you explicitly assign as extent sizes for
the new index are stored in the system catalog. The value that you
specify in the EXTENT SIZE option to the CREATE INDEX statement is
stored in the fextsize column of the sysindices system
catalog table, and the value that you specify in the NEXT SIZE option
is stored in the nextsize column of the same table. If you
omit these options, however, the database server stores a value of
zero ( 0
) in those system catalog columns, rather
than the default value that it calculates and allocates for the first
extent or the next extent of the index.
Example of an index defined with explicit extent sizes
CREATE TABLE IF NOT EXISTS t (a INT, b INT);
CREATE INDEX IF NOT EXISTS idx1 ON t(a) EXTENT SIZE 32 NEXT SIZE 32;
CREATE INDEX IF NOT EXISTS idx2 ON t(b);
- The sysindices.fextent and sysindices.nextent column
values are each
32
for idx1. - The sysindices.fextent and sysindices.nextent column
values are each
0
for idx2.
Here the 0
values for idx2 indicate
that no explicit extent sizes were specified (rather than indicating
that no storage space was allocated).