Inside the engine.
Fifteen paths through the engine and around it, drawn from what the code does. Pick one; the steps on the right light up in time with the picture.
A SELECT, from predicate to answer
Rows are not found through a B-tree. Per-column fingerprints rule out most of the table 512 rows at a time, zone maps rule out whole ranges, and only the candidates left are read.
- 1Predicates extracted
WHERE city = 'Oslo' AND age > 30 is split into an equality the fingerprints can test and a range the zone maps can test.
- 2Zone maps skip ranges
Each zone records min and max per column. Zones whose max age is 30 or less cannot match and are skipped whole.
- 3Fingerprints, 512 at a time
Bit-sliced fingerprint planes for city are compared against 'Oslo' in SIMD: one register answers for 512 rows.
- 4Only candidates are read
The candidate bitmap names the few rows worth fetching. The rest of the rows file is never touched.
- 5Visibility, then exact check
A version this snapshot cannot see is dropped. A fingerprint can say maybe but never no to a match, so each candidate is checked exactly.
- 6The answer
What survives is the answer: no false negatives, ever, and the false positives were cheap.
Why no B-tree on the scan path.
Every column, indexed for free
Each column carries bit-sliced fingerprints and zone bounds, maintained on write. A column nobody indexed still prunes its scans: the cost is a few bits per row, not a second copy of the data.
Wide registers, whole words
Fingerprints are laid out so one SIMD register tests 512 rows. AVX-512 where the CPU has it, AVX2 on every x86-64-v3 machine, and a portable scalar path, used on ARM64, that the SIMD kernels are tested against.
Never a false negative
A fingerprint can say "maybe" when the answer is no; it can never say "no" when the answer is yes. Disabling the filter gives byte-identical results, and the differential tests assert it.
Running in one command.
Linux and Windows, x86-64 and ARM64, a static musl build, an Arch package, or Docker.
# PostgreSQL on 5432, native on 61170 docker run -d --name rasterizeddb \ -e RASTERIZEDDB_PG_PASSWORD=change-me \ -p 5432:5432 -p 61170:61170 \ -v rasterizeddb:/var/lib/rasterizeddb \ milendenev/rasterizeddb:latest psql "postgresql://superuser@127.0.0.1:5432/postgres"