Skip to content
SQLSimplified
Data EngineerQuestion 17 of 55

Distributed Joins & Shuffling

Problem

Your Spark/Snowflake query joining two massive tables is extremely slow. The console shows high network traffic (shuffling) as data is moved across nodes. Write a query that outputs solution with the value: "To prevent shuffles in distributed joins, co-locate tables on the same partition keys, or broadcast small tables to all nodes (broadcast join)."

Database Schema

This problem acts as a scratchpad. You will write your own DDL/DML or conceptual queries, so there is no predefined schema.

Try It

Loading playground environment...

Hint

Solution