Labs
Each lab takes under an hour on a laptop and turns a claim from this mechanism into a number you measured yourself. Code is given as a starting point; adjust names and sizes to your setup.
- 1
Find the crossover on your hardware
Index scan against sequential scan on 5 million PostgreSQL rows, scattered and clustered, at two random_page_cost settings.
Real systemDocker, Python - 2
Composite order and the range column
Indexes on (a, b, c) and (a, c, b) for a = 1 AND b > 5 AND c = 3 in PostgreSQL: index condition, filter and buffers.
Real systemDocker, Python - 3
The partial index and the parameter
A partial index over 1,000 pending rows in 5 million: its size, and whether literal and prepared queries can use it.
Real systemDocker, Python - 4
Zone maps and clustering
50 million timestamped rows in Parquet, random and sorted: row groups a one-hour query must read.
MeasurePython with PyArrow - 5
Inverted index intersection
Intersect posting lists for a common and a rare term over a million documents: query order, smallest first, and skips.
MeasurePython - 6
Choose nlist for IVF
IVF over a million random 128-dimensional vectors: queries per second and recall@10 for nlist 100 to 16,000 and nprobe 1 to 32.
MeasurePython with FAISS