Index Structure
The standard index of an Informix database is that of a modified B-Tree, the latest engines allow different index structures that are optimised to retrieve differing types of data. The later engines also offer a 'R-Tree' index as standard, although the database designer can define their own index access methods. An index on any column (or columns) of a table in the database is stored separately from the data within the table.
Where is the Index stored
-
Standard Engine
a separate file, an ".idx" file within the dbs directory -
OnLine Engine
in separate pages from the data within the tblspace.
IDS 7: by default the index is in separate pages within the table tblspace. Although detached indices are stored in separate tblspaces.
IDS 9+: separate from the data within their own tblspaces
The index contains information pertaining to:
- The order (alphabetic or numeric) of the data, either ascending or descending in value.
It does not force the order on the data - unless it is a Cluster index -but may be used to
increase the speed of a query that contains an ORDER BY clause.
- Any major changes in the data of the column(s) indexed. For example, if alphabetical, the index on the column will note where the A's start, the B's, C's, etc. This is used to speed queries that contain conditions on the column(s).