Google BigQuery (50 Qs)•Part 2: Query Optimization, Security & Analytics Engineering (11 - 24)
How do Broadcast Joins vs Hash Joins work in BigQuery?
senior LevelPerformanceSecurity & Auth
In Simple Words:
- Broadcast Join: When joining a massive table with a small dimension table, BigQuery sends the entire small table to all worker slots, avoiding costly shuffle network transfers.
- Hash Join: When joining two large tables, BigQuery partitions both tables by the join key across the shuffle tier.