Menu

Post image 1
Post image 2
1 / 2
0

Full-Text Search on a 2 GB PostgreSQL Instance

DEV Community·Sylvain Artois·21 days ago
#6MTain5t
Reading 0:00
15s threshold

AFK.live aggregates headlines from 250+ news sources. I needed search. I had a 2 GB database and no budget for Elasticsearch. Fair warning : this article goes deep into PostgreSQL internals — query plans, GIN indexes, trigram scoring. I've added links throughout for context. If you're not familiar with these concepts, the links are there for you. If you are, skip them and enjoy the war stories. The Constraint AFK runs on a Scaleway managed PostgreSQL instance — the smallest tier they offer: DB-PLAY2-PICO : 1 vCPU, 2 GB RAM Cost: roughly 70% of the entire AFK hosting budget (50€) No PGVector. No Elasticsearch. No Typesense. Just PostgreSQL 16 with the pg_trgm and unaccen extensions, which Scaleway includes by default on managed instances. The headlines table has grown past 1 million rows. I needed fuzzy search that handles French accents, returns results in under 300ms, and doesn't bring the tiny instance to its knees. Here's how I got there — and the bugs I hit along the way.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More