Join Column

For joins, keep the data types as narrow as possible to reduce disk I/O and memory requirements.

Because integer comparisons are quicker than character comparisons, use integer data types (unsigned if possible) in joins. Keeping the data types as narrow as possible improves join performance by reducing disk I/O and memory requirements. Because the HG index has slightly more capability from a join perspective, use an HG index on join columns rather than a cardinality appropriate index (LF or HG) . This should be weighed against the potential increase in time to load the HG index as compared to the LF index.

Related concepts
Indexing
Primary Keys
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