PostgreSQL FTS: 50x Speedup with Simple Optimizations
2025-04-09

A recent benchmark by Neon showed PostgreSQL's built-in full-text search (FTS) lagging behind pg_search. However, this article reveals that Neon's benchmark used an unoptimized standard FTS setup. By pre-calculating and storing the `tsvector` column and configuring GIN indexes with `fastupdate=off`, a dramatic performance boost is achieved. Experiments on a 10-million-row dataset demonstrated a ~50x speed improvement, proving that properly optimized standard FTS can rival dedicated search engines. The article also explores VectorChord-BM25, a BM25-based extension excelling in ranking tasks.
Development
Full-Text Search