The 5.33 GB vector index nobody queried
I spent months building a custom Postgres search engine with HNSW and GIN indexes so my agents could recall everything I had ever written or synced. When I finally checked pg_stat_user_indexes, the scan count was zero. Search infrastructure without a daily retrieval habit is a vanity database.
Nov 28, 2026, AI Systems
TL;DR
I spent months building a custom Postgres search engine with HNSW and GIN indexes so my agents could recall everything I had ever written or synced. When I finally checked pg_stat_user_indexes, the scan count was zero. Search infrastructure without a daily retrieval habit is a vanity database.
1. The operational reality
Earlier this year I built a custom recall layer called Cortex. Postgres, pgvector HNSW embeddings, full-text GIN indexes, enrichment jobs pulling from cloud storage, and a self-hosted SearXNG instance sitting beside it. By November the database sat at 5.33 GB on my production box.
Then I ran one query against pg_stat_user_indexes before planning a server move.
idx_scan = 0.
Not low traffic. Zero. The indexes had been maintained, backed up, and guarded by tests for months while nobody, human or agent, queried them in daily work.
2. The distinction
There is a difference between storing context and retrieving context.
Most AI infrastructure builds optimize for storage. Pull every email, embed every note, index every archive, build a unified search API. It feels thorough. The database grows every night and looks like progress.
Retrieval is different. Retrieval only happens when the source sits inside the tool you already have open, or when an agent can reach the live authority directly through MCP without maintaining a stale copy in the middle.
When I actually needed to recall a past conversation or check a relationship, I did not query a custom vector database. I checked live CRM records, live Git issues, or continuous local screen and audio capture through Screenpipe.
3. What replaced it
We deleted the whole search layer instead of tuning it.
Now recall is split cleanly by authority:
- Continuous capture: Screenpipe on the Mac for screen, audio, and meeting recall.
- Structured relationships: Twenty CRM via native MCP.
- Code and decisions: Forgejo issues and Git history directly.
- Client analytics: Read-only SQL in BigQuery.
No custom embedding pipeline. No vector database to back up. Zero stale copies to sync.
Honest state: we are still deleting the leftover repo references as part of the server cutover. The database itself is already off the new box.