Defaults are tuned for 2023, not 2026
pgvector defaults (m=16, ec=64, es=40) were set for 384-dim sentence-transformers. 1536-dim OpenAI embeddings at 500K+ scale need denser graphs and wider query-time exploration.
pgvector recall tuning
HNSW index parameters are immutable after creation, and defaults deliver 67% recall on 2026 RAG workloads. MonPG samples your real embeddings, runs 48 configurations on our benchmark infra, and hands you zero-downtime migration SQL.
Review Question
What HNSW parameters actually give you 95% recall on this exact table, and how do you roll that out without dropping queries?
At A Glance
The page is designed to answer these production questions and search intents without losing the operational context.
Why This Matters
Most teams ship pgvector with default HNSW parameters. The application looks healthy, queries are fast, and metrics stay green. The only signal something is wrong is that users say the chatbot or search feels off. By the time anyone traces it back to the index, trust has eroded.
pgvector defaults (m=16, ec=64, es=40) were set for 384-dim sentence-transformers. 1536-dim OpenAI embeddings at 500K+ scale need denser graphs and wider query-time exploration.
Once you CREATE INDEX, m and ef_construction cannot be ALTERed. Wrong defaults mean a full rebuild, not a tweak.
pganalyze, Datadog, pgwatch all show latency and throughput. None measure recall against ground truth. The silent-killer bug is invisible.
Sample Benchmark Output
500K OpenAI text-embedding-3-small (1536 dim) on a customer-support workload. Winner highlighted. Your numbers will differ; that is the point.
Workflow
01
Read-only credentials or agent token. Self-hosted, Supabase, Neon, RDS, Aurora, AlloyDB, Azure — all supported.
02
Auto-detected from your pgvector inventory. Pick distance operator (cosine, L2, inner product).
03
Your DB sees a single SELECT ... LIMIT N. Sample (1K-100K vectors) is held in memory on our worker only.
04
Brute-force exact k-NN on the sample gives us the reference set for recall@10.
05
m x ef_construction x ef_search in parallel. Build, query, measure recall, latency, size, build time per config.
06
Trade-off matrix, winner config, and zero-downtime CREATE INDEX CONCURRENTLY script ready to copy.
Integrations
Any Postgres 12+ with pgvector 0.5+
Read-only role across all projects
Branching-friendly, works with ephemeral DBs
pgvector 0.8+ on PostgreSQL 15/16/17
Manual params, no native tuner
Flexible Server tier
Measure your recall once this quarter. If it is below 0.85, you have the silent-killer bug and the fix is a zero-downtime index swap. MonPG gives you the measurement and the migration SQL in 10 minutes.
Watch pgvector health alongside the rest of your PostgreSQL fleet.
Broader PostgreSQL tuning context, beyond the vector index.
Simulate rollout risk for any PostgreSQL index, not just HNSW.
Paste EXPLAIN ANALYZE output and get an incident-style read of the plan: planner estimate drift, loop explosions, disk spills, buffer pressure, and the evidence SQL to prove the fix.
Model a proposed PostgreSQL index as a production rollout: DDL shape, lock level, WAL pressure, write amplification, replica lag risk, validation SQL, and rollback criteria.
This page should help with a real decision right now. It should not pretend to replace the historical evidence that production teams need after a deploy, during an incident, or across a longer rollout window.