The Spectrum Dispatch News

technology

PlanetScale releases TIN, a fast full-text search extension for PostgreSQL

The new GA-ready extension supports Boolean, phrase, fuzzy and regex queries, BM25 scoring and concurrent updates, outperforming existing Postgres text-search indexes in benchmarks

PlanetScale releases TIN, a fast full-text search extension for PostgreSQL

PlanetScale announced the general availability of TIN, a new full‑text search extension for PostgreSQL that aims to provide fast, feature‑rich indexing capabilities. TIN, which stands for “Text INdex,” supports Boolean expressions, phrase and span queries, fuzzy and wildcard matching, regular‑expression terms, case and accent folding, COUNT(*) queries and BM25‑scored top‑k results. The extension is usable with a simple CREATE INDEX statement and a custom operator (==>) for searching, as shown in the announcement’s example syntax. The post explains that existing PostgreSQL text‑search options — such as the built‑in GIN index, ParadeDB, and pg_textsearch — did not meet the combined requirements of handling joins, complex WHERE clauses, continuous updates, replication, backups and correct transaction visibility while also delivering high performance. TIN was built to satisfy all of those criteria. To evaluate performance, PlanetScale ran benchmarks on an AWS i7i.8xlarge instance with local NVMe storage, limiting PostgreSQL to 8 vCPUs and 32 GB of RAM. The test corpus was an 85 GB export of Stack Exchange questions and answers containing 150 million documents. Synthetic queries were generated from substrings of 2‑15 terms, interpreted as conjunction, disjunction or phrase queries, yielding 1 719 test queries. Results showed that TIN’s index build time was 8 minutes 10 seconds and its final size was 50.7 GB, fitting within the 32 GB memory limit. In comparison, ParadeDB required 19 minutes 20 seconds and 52.1 GB, pg_textsearch needed 26 minutes 49 seconds and 41.5 GB but demanded 128 GB of RAM during indexing, and the native GIN index took 2 hours 9 minutes 4 seconds and 28 GB, also needing 64 GB RAM. For mixed conjunctive, disjunctive and phrase queries returning the top‑10 BM25‑scored results with no concurrent writes, TIN delivered roughly 25 times the query throughput of ParadeDB and had 26‑times lower 99th‑percentile latency. When the benchmark focused solely on conjunction and phrase queries, TIN was about 10 times faster than ParadeDB and 541 times faster than GIN, with latency improvements of 6× and 1,356× respectively. In a disjunction‑query workload that included 1,000 UPDATEs per second, TIN processed about 36 times more queries than pg_textsearch and 57 times more than ParadeDB, while completing 270,279 updates over a ten‑minute run versus 185,584 for ParadeDB and only 735 for pg_textsearch. The post notes that ParadeDB’s write handling reduces read throughput, whereas pg_textsearch’s read traffic stalls writes after a few seconds. When the index fully fit in shared buffers, TIN, ParadeDB and GIN were tested on an 8.0 GB Wikipedia corpus for simple disjunction counting queries; pg_textsearch was excluded because it only supports top‑k retrieval. PlanetScale positions TIN as a GA‑ready solution for developers needing robust full‑text search in Postgres, citing its ability to handle concurrent writes, complex queries and large corpora without sacrificing speed.

PlanetScale releases TIN, a fast full-text search extension for PostgreSQL

Key facts

Sources

← All posts