Biscuit is a specialized PostgreSQL index for fast pattern matching LIKE queries

Postgres gets a ‘Biscuit’—blazing search with a big appetite

TLDR: Biscuit is a new Postgres index that makes wildcard text searches much faster, with tools to reveal its hefty memory use. Commenters love the speed but debate the trade-off: bigger indexes and RAM hunger versus fewer slow rechecks—classic performance vs. footprint drama with some expert nods and memes.

Postgres just dunked a “Biscuit” in its coffee, and the database crowd is buzzing. This new index turbocharges those messy text searches (the ones with %wildcards%), and the community is split between cheering the speed and side-eyeing the size. One commenter waved benchmarks like a victory flag—Biscuit crushes common setups—while others immediately asked: okay, but how big does it get? The creator even shipped memory tools so you can check exactly how much your Biscuit is snacking on in RAM, with a cute “size pretty” readout. Cue memes about a “carb-heavy index.”

The hype got a boost when performance guru Daniel Lemire noticed Biscuit’s use of Roaring Bitmaps. Fans of Postgres’s extension ecosystem are thrilled—“finally, LIKE queries that don’t crawl.” But the old debate is back: classic full‑text search vs. brute‑force substring matching. One camp says this directly hits the “search inside text” sweet spot better than clunky trigram tricks; another warns that memory bills will bite. A technically minded voice praised Biscuit’s simple, clever design (indexing character positions) and even dropped a nerdy tuning tip about handling the end of strings. Meanwhile, extension lovers are celebrating multi‑column magic and “no recheck” drama. Verdict: fast, bold, and delightfully controversial—just how the Postgres crowd likes it.

Key Points

  • Biscuit is a PostgreSQL index access method optimized for fast LIKE/ILIKE pattern-matching, including multi-column support.
  • New memory introspection utilities provide exact in-memory index size via functions and a consolidated view, alongside on-disk size via pg_relation_size.
  • biscuit_size_pretty is recommended because Biscuit maintains primary structures in memory, making on-disk size insufficient to reflect runtime footprint.
  • Performance update removes redundant bitmaps; case-insensitive searches reuse the same length-based filtering bitmaps as case-sensitive ones.
  • Installation is available from source or PGXN; Biscuit supports multiple data types by converting them to searchable text and uses bitmap character-position indices.

Hottest takes

“Biscuit is 15.0× faster than B-tree (median) and 5.6× faster than Trigram (median)” — out_of_protocol
“This is a fairly simple idea of indexing characters for each column/offset and compressing the bitmaps. Simple is good” — kwillets
“Postgres’s extensible index AM story doesn’t get enough love” — pedrozieg
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.