Two large tables are always joined on customer_id. Which distribution fits?
Why D is the answer
KEY on customer_id
KEY distribution puts matching rows on the same node.
In detail
- KEY puts matching rows on the same node.
- Choose a key with evenly spread values.
Use case
An illustrative scenario, not a real incident.
Orders and customers always join on customer_id. KEY distribution puts matching rows on the same node.
See it in different ways
flowchart TD
A{"Redshift table"} -->|"Large, joined on one key"| B["KEY distribution"]
A -->|"Small dimension table"| C["ALL distribution"]
A -->|"No clear join key"| D["EVEN distribution"]mindmap
root((Distribution))
ALL
Small dimensions
KEY
Large joined tables
Care
VACUUM
ANALYZEmindmap
root(("Redshift cluster"))
n1["Node 1"]
n2["Customers A"]
n3["Orders for A"]
n4["Node 2"]
n5["Customers B"]
n6["Orders for B"]Key point: KEY co-locates joined rows.
Why the other options are wrong
- A. EVEN on both tables
- EVEN spreads rows, so joins move data.
- B. ALL on both large tables
- ALL is for small tables.
- C. No distribution, with a daily copy to S3
- That is not a distribution style.

