Interview practice question
Join causing huge data redistribution
Data Engineering · Redshift · Intermediate
EXPLAIN for a slow query shows DS_DIST_BOTH on a join between two large tables. How do you fix it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Both tables are being redistributed by the join key at runtime.
- Align distribution keys: distribute both on the join column.
- Check the key is evenly distributed.
- Alternatively pre-aggregate one side.
- Re-check EXPLAIN after changes.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.