J
Justin Jaffray
justinjaffray.com · Personal blog · on HN since 2016
Justin Jaffray writes technical posts on database internals, including query engines, joins, optimizers, cost models and durability.
What HN saysHN commenters praise his intro to worst-case optimal joins as excellent and solid, and like the simple examples in his push vs. pull query engines post.
19HN people shared it
4linked it in comments
36stories submitted
688story points
1 year agolast shared
2016people per year2026
Most-shared posts
- 1Query Engines: Push vs. Pull6 people · 259 points · first shared 2021 · 35 comments on HN
- 2A Charming Algorithm for Count-Distinct4 people · 34 points · first shared 2023 · 2 comments on HN
- 3A Gentle(-Ish) Introduction to Worst-Case Optimal Joins4 people · 9 points · first shared 2022 · discussion on HN
- 4Durability and Redo Logging2 people · 30 points · first shared 2022 · 13 comments on HN
- 5Understanding Cost Models2 people · 10 points · first shared 2020 · discussion on HN
- 6Join: The Projection2 people · 6 points · first shared 2022 · discussion on HN
- 7What Is a Query Optimizer For?2 people · 2 points · first shared 2020 · discussion on HN
- 8Timely Dataflow and Total Order1 people · 97 points · first shared 2020 · 2 comments on HN
- 9A gentle-ish introduction to worst-case optimal joins1 people · 92 points · first shared 2022 · 12 comments on HN
- 10What Write Skew Looks Like1 people · 89 points · first shared 2018 · 19 comments on HN
- 11Joins 13 Ways1 people · 18 points · first shared 2023 · discussion on HN
- 12Compaction1 people · 8 points · first shared 2021 · discussion on HN
- 13Deduplicating Decklists1 people · 7 points · first shared 2020 · 2 comments on HN
- 14What Does Write Skew Look Like?1 people · 6 points · first shared 2018 · discussion on HN
- 15Reflections on Stacking Stacks1 people · 4 points · first shared 2018 · 2 comments on HN
What HN people wrote when they linked it
johnthescott · 2023-09-25
excellent intro to worst case optimal joins: https://justinjaffray.com/a-gentle-ish-introduction-to-worst-case-opti…
pjot · 2023-12-26
I enjoyed this post on pull/push based query engines - its examples were wonderfully simple.
https://justinjaffray.com/query-engines-push-vs.-pull/
gavinray · 2023-07-04
Justin also has a post on WCOJ that's really solid:
https://justinjaffray.com/a-gentle-ish-introduction-to-worst-case-opti…
j-pb · 2022-07-28
The intuition is that if your join is a triangle you might be forced to join every relation only to discover that the result is empty on the last join, which requires m^n intermediary results, where m is the size of the relations and n is the number of relations.
A WCO join algorithm will figure out quite quickly that the output is empty and is in practice much more dependent on the actual output size, than the size of the input relations.
See:
https://www.cs.stanford.edu/people/chrismre/papers/paper49.Ngo.pdf
https://justinjaffray.com/a-gentle-ish-introduction-to-worst-case-opti…