NULL BITMAP by Justin Jaffray
Archives
Search
Subscribe
Lightweight Cardinality Estimation with Density
December 15, 2025
Last week we talked about the different ways we can decompose a simple predicate which is a conjunction of two simpler predicates. Given the query: SELECT *...
Predicate Decomposition
December 8, 2025
One of the fundamental things that query planners have to do is decompose predicates. What do I mean by that, well, it's actually something that comes up...
More Data Independence and the History of the Relational Model
December 1, 2025
Last week we talked about some of the reasons why we want data independence. This week I want to talk about some of the historical steps that brought us to...
Data Independence
November 24, 2025
You and your bud are jamming out to math rock at the office while you work on the MVP of Datablaster 3000 and then the senior engineer walks in to the office...
Ordering and Partitioning
November 17, 2025
I've recently been downsizing my Magic: The Gathering collection to cards that I really want to keep. I think a "collectible card game" is a good way to...
Query Plan Caching
November 10, 2025
Serious NULL BITMAP heads know my love for the Query Plan Diagram. This is a 2D-rendering that represents the selection of plans for a particular shape of...
Lowering in Reverse
November 3, 2025
Recall last week, we talked about how to take a SQL query and turn it into a lower level plan, so this week I want to talk about how we can generate SQL...
Lowering in SQL
October 27, 2025
In the land of compilers, going from a higher-level representation of a program (that's easier for a human to author) to a lower-level representation (that's...
The Death of Thread Per Core
October 20, 2025
Programming language async runtimes are very focused on handling asynchronous, possibly long running tasks, that might yield for a variety of reasons, that...
Ordering types in SQL
October 13, 2025
A common problem that comes up in apps that use relational databases is the need to maintain some kind of user-defined order over rows. Imagine you have a...
Self-Extracting F3
October 6, 2025
Like everyone else who knows what a "row group" is, I spent some of last week looking into F3, the new columnar data format out of CMU. To take a step back,...
Another Sampling Technique
September 29, 2025
I am in the midst of moving, so here is another short post! Last week, we talked about how to use rejection sampling to sample possible complicated...
I Misunderstood Rejection Sampling All This Time
September 22, 2025
If you’re like me, you have cobbled together an understanding of statistics following your mediocre second-year stats class by watching YouTube videos and...
Infinite Relations
September 15, 2025
Let's write a super simply query engine using the iterator model. Something like this is conceptually what the compilation target for something like SQL...
Query Operator Structures
September 8, 2025
The way we usually like to think about operators in query plans is that they're just representative of "result sets." In the Volcano model, they're just...
Should We Have Been using LLMs for Our Test Queries This Whole Time?
September 1, 2025
Longtime readers of NULL BITMAP will know that I am bullish on metamorphic and in general, property-based testing for things that are SQL-shaped. I generally...
Some Stuff I've Been Reading
August 25, 2025
I’ve been on vacation and I don’t really have an exciting post to share, but I have been reading some, so here’s a bit of my reading list, and maybe you will...
Discrete Distributions
August 18, 2025
For a while now, my favourite piece of technical writing has been Darts, Dice, and Coins: Sampling from a Discrete Distribution by Keith Schwarz. In it, he...
NULL BITMAP Two-Year ZINE Special
August 11, 2025
It has been (about) two years of writing NULL BITMAP! Thank you for reading. This issue is very special because it contains none of my technical writing, but...
Diagrams For Yourself
August 4, 2025
I have a large need of diagrams. In particular when I'm writing something longer about a query planning topic I often would like some kind of standardized...
Older archives