SpinTheMic
Pro

Explain it in 60 seconds

Sort-merge join

Data Engineering · Spark · Intermediate

How does a sort-merge join work in Spark, and when is it used?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Default join for two large tables.
  • Both sides are shuffled by the join key, then sorted, then merged.
  • Scales to very large data but is shuffle-heavy.
  • Skewed keys make some tasks very slow.
  • Bucketing or pre-partitioned data can avoid repeated shuffles.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics