Model
Hybrid hash: a ramp, not a cliff
The transition from in-memory to spilled is a linear ramp, not a cliff.
- Build size
- the build side
- Memory
- memory for the build side
How it behaves
One input on the horizontal axis, the others held fixed.
Data table
| Build side ÷ memory m/M | Spilled |
|---|---|
| 0.5 | 0% |
| 0.519 | 0% |
| 0.539 | 0% |
| 0.559 | 0% |
| 0.581 | 0% |
| 0.603 | 0% |
| 0.626 | 0% |
| 0.65 | 0% |
| 0.675 | 0% |
| 0.7 | 0% |
| 0.727 | 0% |
| 0.755 | 0% |
| 0.784 | 0% |
| 0.814 | 0% |
| 0.845 | 0% |
| 0.877 | 0% |
| 0.91 | 0% |
| 0.945 | 0% |
| 0.981 | 0% |
| 1.02 | 1.82% |
| 1.06 | 5.43% |
| 1.1 | 8.9% |
| 1.14 | 12.3% |
| 1.18 | 15.5% |
| 1.23 | 18.6% |
| 1.28 | 21.6% |
| 1.32 | 24.5% |
| 1.37 | 27.2% |
| 1.43 | 29.9% |
| 1.48 | 32.5% |
| 1.54 | 35% |
| 1.6 | 37.4% |
| 1.66 | 39.7% |
| 1.72 | 41.9% |
| 1.79 | 44% |
| 1.85 | 46.1% |
| 1.93 | 48.1% |
| 2 | 50% |
| 2.07 | 51.8% |
| 2.15 | 53.6% |
| 2.24 | 55.3% |
| 2.32 | 56.9% |
| 2.41 | 58.5% |
| 2.5 | 60% |
| 2.6 | 61.5% |
| 2.7 | 62.9% |
| 2.8 | 64.3% |
| 2.91 | 65.6% |
| 3.02 | 66.9% |
| 3.13 | 68.1% |
| 3.25 | 69.2% |
| 3.38 | 70.4% |
| 3.5 | 71.5% |
| 3.64 | 72.5% |
| 3.78 | 73.5% |
| 3.92 | 74.5% |
| 4.07 | 75.4% |
| 4.23 | 76.3% |
| 4.39 | 77.2% |
| 4.55 | 78% |
| 4.73 | 78.9% |
| 4.91 | 79.6% |
| 5.1 | 80.4% |
| 5.29 | 81.1% |
| 5.49 | 81.8% |
| 5.7 | 82.5% |
| 5.92 | 83.1% |
| 6.15 | 83.7% |
| 6.38 | 84.3% |
| 6.62 | 84.9% |
| 6.88 | 85.5% |
| 7.14 | 86% |
| 7.41 | 86.5% |
| 7.69 | 87% |
| 7.99 | 87.5% |
| 8.29 | 87.9% |
| 8.61 | 88.4% |
| 8.94 | 88.8% |
| 9.28 | 89.2% |
| 9.63 | 89.6% |
| 10 | 90% |
Worked examples, recomputed
Every number the mechanisms quote for this relationship is recomputed from it, so none of them disagrees with it.
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?