System Architecture 2-111
Create a Table: What Happens on Disk
The paragraphs that follow describe the major events that occur when
OnLine creates a table and allocates the initial extent of disk space.
Allocate Disc Space
OnLine searches the linked list of chunk free-list maps in the dbspace for
contiguous free space equal to the initial extent size for the table. When
adequate space is found, the pages are allocated and the associated chunk
free-list page is updated. If space for the extent cannot be found, an error is
returned. (Since an extent is, by definition, contiguous disk space, extents
cannot span two chunks.)
Add Entry to tblspace Tblspace
OnLine adds a one-page entry for this table to the tblspace tblspace in this
dbspace. The tblspace number assigned to this table is derived from logical
page number in the tblspace tblspace where the table is described. (Refer to
page 2-104 for further information about the tblspace tblspace.)
The tblspace number indicates the dbspace where the tblspace is located.
Tblspace extents can be located in any of the dbspace chunks. Execute
tbcheck -pe for a listing of the dbspace layout by chunk if you must know
exactly where the tblspace extents are located.
Add Entry to System Catalog Tables
Thetable itself is fully described in entries stored in the system catalog tables
forthe database. Each table is assigned a table identification number or tabid.
Thetabid value of the first user-defined table in a database is always 100. For
a complete discussion of the system catalog, refer toIBM Informix Guide to
SQL: Tutorial.