ALEXKRI.NET
Resume Contact
← Back

Tin: full-text search for Postgres

The clever bit in PlanetScale’s new Postgres full-text index isn’t the BM25 scoring, it’s that they threw out the document ID map entirely and index on ctid, the tuple’s physical heap location. A page holds at most 291 tuples, so the bitmaps fit in a CPU vector register and intersections run as AVX-512 ops with no decompression. On 150M Stack Exchange docs that lands 541x Postgres GIN on phrase queries.

Read the source ↗