2-124 IBM Informix OnLine Database Server Administrator’s Guide
Data Row Format and Rowid
Therowid structure permits the length of the row and its location on a page
to change without affecting the contents of the rowid. Either change—a
change in length caused by an insert or a delete, or a change in location on
the page caused by OnLine page compression—is reflected in the entry
stored in the slot table. If the page where the data row is stored changes, a
forward pointer is left on the home page. In all cases, the rowid remains
accurate.Figure 2-26 illustrates the rowid format.
Thelogical page number describes the data row home page. The logical page
number is stored in the most significant three bytes of the rowid as an
unsigned integer. Logical pages are numbered relative to the tblspace. That
is,the first logical page in a tblspace is page 0. (Physical page numbersrefer
tothe address of the page in the chunk.) For example, if you create a table and
the resulting initial extent is located in the middle of a chunk, the physical
addressof the first page in the extent represents the location in the chunk. The
logical address for the same page is 0. Since the largest number that can be
stored in the rowid is 16,777,215, this is the upper limit of the number of
pages that can be contained in a single tblspace.
EveryOnLine data row is uniquely identified by an unchanging rowid. The
rowidis stored in the index pages associated with the table to which the data
rowbelongs. When a database server process requires a data row, it searches
theindex to find the rowid and uses this information to locate the requested
row.If the table is not indexed, the database server process may sequentially
read all the rows in the table. Another possibility is that the server process
may build an implicit table that is indexed.
Figure2-26
The rowid
format permits the
data length and
location on the
page to change
without
affecting the value
of the rowid.
31 - 08 Logical page number where the data is located
0 - 07 Number of the slot table entry on this page
Rowid format
31 07 0