Primary Keys

Multi-column primary keys should have an additional LF or HG index placed on each column specified in the primary key. This must be done manually as SAP Sybase IQ only creates an HG index on the composite columns.

UNIQUE constraint, UNIQUE HG, and primary key share an identical structure. That structure uses an HG index with no G-Array to store the row ids. When possible, use primary keys on tables. This helps the optimizer make more informed query path decisions even if the index is not used. The index structure provides detailed statistics to help the optimizer make better choices as well as providing a structure to traverse the data.

Related concepts
Indexing
Join Column
Foreign Keys
Proper Data Type Sizing
Null Values
Unsigned Data Types
LONG VARCHAR and LONG VARBINARY
Large Object Storage
Temporary Tables
Denormalizing for Performance
UNION ALL Views for Faster Loads
Hash Partitioning