When the table lives on fifty machines: distributed queries
The Query Planner · Open board
The planner choosing a plan from row-count guesses. On many machines it makes the same kind of choice, and the price of a wrong guess is rows sent over a network.
Before you start.The Query Planner showed that the planner bets on how many rows a step returns, and picks a join method from that bet. Build three ways to join built the hash join, with its build side and probe side, and counted comparisons exactly. Partitioning split one big table by key range or by hash across machines. Batch Processing introduced the shuffle that brings one key to one machine. This lesson puts those four together inside a query.
Lesson 22 of 26 in Database Internals
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.