Law
Join output size
Output size is a sum of products of key frequencies, so skewed keys can make a small input produce a large output.
- Frequency in R
- how many times key value v occurs in R
Worked examples, recomputed
Every number the mechanisms quote for this relationship is recomputed from it, so none of them disagrees with it.
- keys 7 (5 × 3) and 8 (2 × 1) → 17 rows from 11
- a key 10× oversized on both sides → 100× the work
- 3 orders × 2 tickets through one customer → 6 rows
- freight repeated per line: 70 instead of 30
Where it appears
Each mechanism states it in its own names. The general symbol each name stands for is shown with it.
- Query Processing
Why can one question be answered by plans whose costs differ by a factor of ten thousand, and what does each operator force the engine to do?
- Data Modeling
What does one row mean, who is allowed to change that answer, and what breaks downstream when they do?