What is the difference between a broadcast join and a hash join in BigQuery, and how does the engine decide?

Quick Overview

Asks how broadcast joins and hash joins differ in BigQuery and how the query engine chooses between them. It tests understanding of distributed data movement, memory limits on workers, join key skew, and how to read and influence a query plan.

What is the difference between a broadcast join and a hash join in BigQuery, and how does the engine decide?

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Other

What is the difference between a broadcast join and a hash join in BigQuery, and how does the engine decide which one to use? ```hint Follow the data For each strategy, ask which table's rows have to cross the network and how much memory each worker needs. ``` ```hint One busy key Consider what happens to the work split when a single join key value accounts for a large share of the rows. ``` ### What a Strong Answer Covers - How each strategy moves data between workers and where the matching happens - The cost of each in network traffic, memory and time, and when each is the only workable option - What information the engine uses to choose, and when the choice is made - How a user can see which strategy ran and steer the choice - How skew in the join key affects performance ### Follow-up Questions - A join stage runs far longer than the others, and one worker processes most of its rows. What is happening, and how would you fix it? - Does the join strategy change the bytes billed for an on-demand query? - In a `LEFT JOIN`, which side can be broadcast, and why?

Overview: Asks how broadcast joins and hash joins differ in BigQuery and how the query engine chooses between them. It tests understanding of distributed data movement, memory limits on workers, join key skew, and how to read and influence a query plan.

Nov 24, 2026
mediumData ScientistOtherData Manipulation (SQL/Python)
0
0

What is the difference between a broadcast join and a hash join in BigQuery, and how does the engine decide which one to use?

What a Strong Answer Covers Guidance

  • How each strategy moves data between workers and where the matching happens
  • The cost of each in network traffic, memory and time, and when each is the only workable option
  • What information the engine uses to choose, and when the choice is made
  • How a user can see which strategy ran and steer the choice
  • How skew in the join key affects performance

Follow-up Questions Guidance

  • A join stage runs far longer than the others, and one worker processes most of its rows. What is happening, and how would you fix it?
  • Does the join strategy change the bytes billed for an on-demand query?
  • In a LEFT JOIN , which side can be broadcast, and why?