Specifying the first and next extent sizes for the tblspace tblspace

You can specify first and next extent sizes if you want to reduce the number of tblspace tblspace extents and reduce the frequency of situations when you must place the tblspace tblspace extents in non-primary chunks. (A primary chunk is the initial chunk in a dbspace.)

You can choose to specify the first extent size, the next extent size, both the first and the next extent size, or neither extent size. If you do not specify first or next extent sizes for the tblspace tblspace, HCL Informix® uses the existing default extent sizes.

You can use the TBLTBLFIRST and TBLTBLNEXT configuration parameters to specify the first and next extent sizes for the tblspace tblspace in the root dbspace that is created when the server is initialized.

You can use the onspaces utility to specify the first and next extent sizes for the tblspace tblspace in non-root dbspaces.

You can only specify the first and next extent sizes when you create dbspace. You cannot alter the specification of the first and next extent sizes after the creation of the dbspace. In addition, you cannot specify extent sizes for temporary dbspaces, sbspaces, blobspaces, or external spaces. You cannot alter the specification of the first and next extents sizes after the creation of the dbspace.

To specify the first and next extent sizes:

  1. Determine the total number of pages required in the tblspace tblspace. The number of pages is equal to the sum of the number of tables, detached indexes, and table fragments likely to be located in the dbspace plus one page for the tblspace tblspace.
  2. Calculate the number of KB required for the number of pages. This number depends on the number of KB to a page on the system.
  3. Determine the space management requirements on your system by considering the importance of having all of the extents for the tblspace tblspace allocated during dbspace creation and whether the extents must be allocated contiguously. The more important these issues are, the larger the first extent size must be. If you are less concerned with having non-contiguous extents, possibly in secondary chunks, then the first and next extent sizes can be smaller.
  4. Specify the extent size as follows:
    • If the space requirement is for the root dbspace, specify the first extent size in the TBLTBLFIRST configuration parameter and the next extent size in the TBLTBLNEXT configuration parameter. Then initialize the database server instance.
    • If the space requirement is for a non-root dbspace, indicate the first and next extent sizes on the command line using the onspaces utility to create the dbspace.
Extent sizes must be in KB and must be multiples of the page size. When you specify first and next extent sizes, follow these guidelines:
Type of extent Minimum size Maximum size
First extent in a non-root dbspace The equivalent of 50 pages, specified in KB. This is the system default. For example, for a 2 KB page system, the minimum length is 100. The size of the initial chunk, minus the space required for any system objects such as the reserved pages, the database tblspace, and the physical and logical logs.
First extent in a root dbspace The equivalent of 250 pages specified in KB. This is the system default. The size of the initial chunk, minus the space required for any system objects such as the reserved pages, the database tblspace, and the physical and logical logs.
Next Extent Four times the disk-page size on the system. The default is 50 pages on any type of dbspace. The maximum chunk size minus three pages.
You use the following onspaces utility -ef and -en options to specify the first and next extent sizes for the tblspace tblspace in non-root dbspaces:
  • First extent size: -ef size_in_kbytes
  • Next extent size: -en size_in_kbytes
For example, you can specify:
onspaces -c -d dbspace1 -p /usr/data/dbspace1 -o 0 -s 1000000 -e 2000 -n 1000

You can use Oncheck -pt and oncheck -pT to show the first and next extent sizes of a tblspace tblspace.

If data replication is being used and a dbspace is created on the primary database server, the first and next extent sizes are passed to the secondary database server through the ADDCHK log record.

For more information about the onspaces utility, oncheck commands, and specifying the first and next extent sizes for the tblspace tblspace, see the HCL Informix Administrator's Reference.


Copyright© 2019 HCL Technologies Limited