This chapter describes storage structures, secondary indexes, and keys. It will help you decide on the best structure and corresponding options to suit your needs.
A storage structure is a file arrangement providing a way to access data in a database table.
Keyed storage structures provide fast access to a particular row or set of rows in a database table.
A key is the field or fields that the table is indexed on. Specifying this key gives you quick access to the rows you are looking for.
The index contains the contents of the key fields.
A secondary index allows you to specify an additional key.
Ingres provides multiple types of storage structures. Each storage structure provides optimal performance for particular types of queries and applications. Choosing the best storage structure is essential to maintaining good performance.
When you create or modify a table, you can choose the appropriate storage structure and specify options to fine-tune the structure.
The types of storage structures are summarized here:
The default non-keyed storage structure with sequential data entry and access. There is also a compressed heap structure (cheap) with trailing blanks removed.
A keyed storage structure with algorithmically chosen addresses based on key data values. There is also a compressed hash structure (chash) with trailing blanks removed.
A keyed storage structure in which data is sorted by values in key columns for fast access. The index is static and needs remodification as the table grows. There is also a compressed ISAM structure (cISAM) with trailing blanks removed.
A keyed storage structure in which data is sorted by values in key columns, but the index is dynamic and grows as the table grows. There is also a compressed B-tree structure (cB-tree) with trailing blanks removed.
For more information on the compressed structure for each of the above types, see the chapter "Maintaining Storage Structures."
Another storage structure, R-tree, can be used only on secondary indexes, as described in R-tree Secondary Index.