TIN (Text INdex) is a new GA Postgres extension that provides a full-featured, high-performance text index for Postgres and Neki databases. It supports Boolean, phrase and span queries; fuzzy, wildcard and regular-expression term matching; case and accent folding; COUNT( ) queries and BM25 top-k ranking; and integrates with Postgres features like joins, complex WHERE clauses, continuous updates, replication, backups and correct MVCC visibility. Index creation is standard SQL (CREATE INDEX ... USING tin(column)) and queries use the ==> operator to match text expressions, making it a drop-in search index for common application patterns such as product search, legal discovery and tag counting.
Benchmarks on an 85 GB Stack Exchange corpus (and additional tests on Wikipedia, Reddit and mixed corpora) show TIN dramatically outperforms existing Postgres text-index options. Index build: TIN built in 8m10s to 50.7 GB using 32 GB RAM, versus ParadeDB 19m20s/52.1 GB (64 GB), pg_textsearch 26m49s/41.5 GB (128 GB) and GIN 2h9m/28.0 GB (64 GB). In mixed top‑10 BM25 tests TIN served ~25× the QPS of ParadeDB with ~26× lower p99 latency; for conjunction/phrase TIN was ~10× ParadeDB and ~541× GIN; disjunction with concurrent writes saw TIN ~36× pg_textsearch and ~57× ParadeDB. TIN also reads far less data per query (e.g., 65 MB/query vs ParadeDB’s 582 MB/query in mixed tests) and completed ~270k updates in ten minutes versus ParadeDB ~185k and pg_textsearch 735.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.