Interview practice question
Joining two huge tables repeatedly
Data Engineering · Spark · Experienced
Every day, two multi-terabyte tables are joined on customer_id, and the shuffle takes most of the runtime. How can you reduce it?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Both sides shuffle every run with sort-merge join.
- Pre-organize both tables by the join key: bucketing or clustering.
- Filter both sides to only needed rows and columns first.
- Join incrementally on changed data where possible.
- Consider storage-partitioned joins where supported.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.