System Architecture 2-133
Structure of an Index Page
Page Compression
Over time, the free space on a page can become fragmented. When OnLine
attempts to store data, it first checks row length against the number of free
bytes on a page to determine if the row fits. If there is adequate space, OnLine
checks to see if the page contains adequate contiguous free space to hold the
row (or row portion). If the free space is not contiguous, OnLine calls for page
compression.
During page compression, a user process locates a free buffer in the shared-
memory buffer pool and copies to the buffer the data page header and page
timestamp. Then, starting from the first slot table entry, the user process
copies each slot table entry and its associated data, updating the slot table
information as the data is written to the buffer. When the process completes
the rewriting, the newly compressed page is written back to the data page.
As a result, all free space in the data page is contiguous and the row (or row
portion) is stored according to the usual procedure of writing the data and its
associated slot table entry.
Structure of an Index Page
OnLine employs a B+ tree structure for organizing table index information.
A fully developed index is composed of three different types of index pages:
■ One root node page, which can contain pointers to branch pages,
pointers to leaf pages, or key values and rowids
■ One or more branch node pages, which can contain pointers to leaf
pages or key values and rowids
■ One or more leaf node pages, which can contain only key values and
rowids
Each type of index page serves a different function. The following
paragraphs describe each page and the role it plays in information storage.
Refer to IBM Informix Guide to SQL: Tutorial for a general discussion of how to
estimate the number of pages needed for a table index.
Refer to page 2-121 for a description of the slot table, which appears on every
index page.