A fact table is frequently joined with a dimension table in Redshift.
Reduce network redistribution during joins and keep cluster performance stable.
Which design is most appropriate?
Choose a DISTKEY based on frequent joins, then validate cardinality and skew; small tables may instead use ALL or AUTO distribution.
Detailed explanation
Audit columns do not determine how related business rows should be distributed.
Audit columns do not determine how related business rows should be distributed.
A sort key helps range scans but does not directly choose a node for a join.
A sort key helps range scans but does not directly choose a node for a join.
Replicating large tables to every node increases storage and load cost.
Replicating large tables to every node increases storage and load cost.
Rows with the same join key can be colocated on slices, reducing network movement.
Rows with the same join key can be colocated on slices, reducing network movement.
Check official documentation
Compare the following points with the official documentation.
Amazon Redshift data distribution、DISTKEY、DISTSTYLE、EXPLAINの公式説明を確認する。
What to confirm
分散キーとソートキーの目的、DISTSTYLE ALLの適用範囲を区別できる。
Key points
- DISTKEY
- Data redistribution
- Skew
- Join
Notes
- Environment: AWS公式DEA-C01試験ガイドと各サービスの公式ドキュメントの確認
- Confirm current AWS service behavior in the official DEA-C01 documentation.
Foundation review
Join locality
A suitable distribution key reduces network movement for common joins.
Measure before fixing
EXPLAIN and slice statistics reveal whether a key improves or worsens skew.