Model
Graph traversal is exponential in depth
Graph query cost is exponential in depth until it saturates the component. Shallow-from-few is OLTP; everything else is a disguised full scan.
- Degree
- average edges at a vertex
- Hops
- hops traversed
How it behaves
One input on the horizontal axis, the others held fixed.
from one endbidirectional
Data table
| Hops k | series | Vertices touched |
|---|---|---|
| 1 | from one end | 100 |
| 1.06 | from one end | 133 |
| 1.13 | from one end | 178 |
| 1.19 | from one end | 237 |
| 1.25 | from one end | 316 |
| 1.31 | from one end | 422 |
| 1.38 | from one end | 562 |
| 1.44 | from one end | 750 |
| 1.5 | from one end | 1K |
| 1.56 | from one end | 1.33K |
| 1.63 | from one end | 1.78K |
| 1.69 | from one end | 2.37K |
| 1.75 | from one end | 3.16K |
| 1.81 | from one end | 4.22K |
| 1.88 | from one end | 5.62K |
| 1.94 | from one end | 7.5K |
| 2 | from one end | 10K |
| 2.06 | from one end | 13.3K |
| 2.13 | from one end | 17.8K |
| 2.19 | from one end | 23.7K |
| 2.25 | from one end | 31.6K |
| 2.31 | from one end | 42.2K |
| 2.38 | from one end | 56.2K |
| 2.44 | from one end | 75K |
| 2.5 | from one end | 100K |
| 2.56 | from one end | 133K |
| 2.63 | from one end | 178K |
| 2.69 | from one end | 237K |
| 2.75 | from one end | 316K |
| 2.81 | from one end | 422K |
| 2.88 | from one end | 562K |
| 2.94 | from one end | 750K |
| 3 | from one end | 1M |
| 3.06 | from one end | 1.33M |
| 3.13 | from one end | 1.78M |
| 3.19 | from one end | 2.37M |
| 3.25 | from one end | 3.16M |
| 3.31 | from one end | 4.22M |
| 3.38 | from one end | 5.62M |
| 3.44 | from one end | 7.5M |
| 3.5 | from one end | 10M |
| 3.56 | from one end | 13.3M |
| 3.63 | from one end | 17.8M |
| 3.69 | from one end | 23.7M |
| 3.75 | from one end | 31.6M |
| 3.81 | from one end | 42.2M |
| 3.88 | from one end | 56.2M |
| 3.94 | from one end | 75M |
| 4 | from one end | 100M |
| 4.06 | from one end | 133M |
| 4.13 | from one end | 178M |
| 4.19 | from one end | 237M |
| 4.25 | from one end | 316M |
| 4.31 | from one end | 422M |
| 4.38 | from one end | 562M |
| 4.44 | from one end | 750M |
| 4.5 | from one end | 1B |
| 4.56 | from one end | 1.33B |
| 4.63 | from one end | 1.78B |
| 4.69 | from one end | 2.37B |
| 4.75 | from one end | 3.16B |
| 4.81 | from one end | 4.22B |
| 4.88 | from one end | 5.62B |
| 4.94 | from one end | 7.5B |
| 5 | from one end | 10B |
| 5.06 | from one end | 13.3B |
| 5.13 | from one end | 17.8B |
| 5.19 | from one end | 23.7B |
| 5.25 | from one end | 31.6B |
| 5.31 | from one end | 42.2B |
| 5.38 | from one end | 56.2B |
| 5.44 | from one end | 75B |
| 5.5 | from one end | 100B |
| 5.56 | from one end | 133B |
| 5.63 | from one end | 178B |
| 5.69 | from one end | 237B |
| 5.75 | from one end | 316B |
| 5.81 | from one end | 422B |
| 5.88 | from one end | 562B |
| 5.94 | from one end | 750B |
| 6 | from one end | 1,000B |
| 1 | bidirectional | 20 |
| 1.06 | bidirectional | 23.1 |
| 1.13 | bidirectional | 26.7 |
| 1.19 | bidirectional | 30.8 |
| 1.25 | bidirectional | 35.6 |
| 1.31 | bidirectional | 41.1 |
| 1.38 | bidirectional | 47.4 |
| 1.44 | bidirectional | 54.8 |
| 1.5 | bidirectional | 63.2 |
| 1.56 | bidirectional | 73 |
| 1.63 | bidirectional | 84.3 |
| 1.69 | bidirectional | 97.4 |
| 1.75 | bidirectional | 112 |
| 1.81 | bidirectional | 130 |
| 1.88 | bidirectional | 150 |
| 1.94 | bidirectional | 173 |
| 2 | bidirectional | 200 |
| 2.06 | bidirectional | 231 |
| 2.13 | bidirectional | 267 |
| 2.19 | bidirectional | 308 |
| 2.25 | bidirectional | 356 |
| 2.31 | bidirectional | 411 |
| 2.38 | bidirectional | 474 |
| 2.44 | bidirectional | 548 |
| 2.5 | bidirectional | 632 |
| 2.56 | bidirectional | 730 |
| 2.63 | bidirectional | 843 |
| 2.69 | bidirectional | 974 |
| 2.75 | bidirectional | 1.12K |
| 2.81 | bidirectional | 1.3K |
| 2.88 | bidirectional | 1.5K |
| 2.94 | bidirectional | 1.73K |
| 3 | bidirectional | 2K |
| 3.06 | bidirectional | 2.31K |
| 3.13 | bidirectional | 2.67K |
| 3.19 | bidirectional | 3.08K |
| 3.25 | bidirectional | 3.56K |
| 3.31 | bidirectional | 4.11K |
| 3.38 | bidirectional | 4.74K |
| 3.44 | bidirectional | 5.48K |
| 3.5 | bidirectional | 6.32K |
| 3.56 | bidirectional | 7.3K |
| 3.63 | bidirectional | 8.43K |
| 3.69 | bidirectional | 9.74K |
| 3.75 | bidirectional | 11.2K |
| 3.81 | bidirectional | 13K |
| 3.88 | bidirectional | 15K |
| 3.94 | bidirectional | 17.3K |
| 4 | bidirectional | 20K |
| 4.06 | bidirectional | 23.1K |
| 4.13 | bidirectional | 26.7K |
| 4.19 | bidirectional | 30.8K |
| 4.25 | bidirectional | 35.6K |
| 4.31 | bidirectional | 41.1K |
| 4.38 | bidirectional | 47.4K |
| 4.44 | bidirectional | 54.8K |
| 4.5 | bidirectional | 63.2K |
| 4.56 | bidirectional | 73K |
| 4.63 | bidirectional | 84.3K |
| 4.69 | bidirectional | 97.4K |
| 4.75 | bidirectional | 112K |
| 4.81 | bidirectional | 130K |
| 4.88 | bidirectional | 150K |
| 4.94 | bidirectional | 173K |
| 5 | bidirectional | 200K |
| 5.06 | bidirectional | 231K |
| 5.13 | bidirectional | 267K |
| 5.19 | bidirectional | 308K |
| 5.25 | bidirectional | 356K |
| 5.31 | bidirectional | 411K |
| 5.38 | bidirectional | 474K |
| 5.44 | bidirectional | 548K |
| 5.5 | bidirectional | 632K |
| 5.56 | bidirectional | 730K |
| 5.63 | bidirectional | 843K |
| 5.69 | bidirectional | 974K |
| 5.75 | bidirectional | 1.12M |
| 5.81 | bidirectional | 1.3M |
| 5.88 | bidirectional | 1.5M |
| 5.94 | bidirectional | 1.73M |
| 6 | bidirectional | 2M |
Worked examples, recomputed
Every number the mechanisms quote for this relationship is recomputed from it, so none of them disagrees with it.
- d = 100, 3 hops → 1,000,000
- 4 hops bidirectionally → 20,000 instead of 100,000,000
- GraphQL: 100 × 100 × 100 objects for one call at depth 3
Where it appears
Each mechanism states it in its own names. The general symbol each name stands for is shown with it.
- Specialized Processing Models
What do you build when a query predicate cannot be reduced to a range over an ordered key?
- Interfaces & Formats
What can two parties agree on when they cannot talk to each other?
100 children per level = · depth =