pgvector
Vector search, in the database you already run
pgvector turns Postgres into a competent vector store for retrieval-augmented generation, semantic search, and recommendations. I use it heavily for sub-10M-vector workloads where keeping embeddings, metadata, and transactional data in one queryable system beats the operational cost of a separate vector database.
Years
Projects
Proficiency
My take
Why I use pgvector
For most RAG workloads under 10 million vectors, pgvector wins on operational simplicity. Embeddings live next to the rows they describe, so I can JOIN against permissions, tenancy, and metadata in one query. HNSW indexes ship in pgvector 0.5+ and bring recall and latency into the same league as dedicated vector stores for typical workloads.
Want the broader stack philosophy? Read about how Sri picks tools or browse engineering insights.
Honest assessment
Strengths & tradeoffs
No tool is perfect. Here's what shines and what to watch for.
Strengths
- Vectors live in Postgres, transactional with the rest of your data
- HNSW and IVFFlat indexes cover most accuracy/latency tradeoffs
- Hybrid search (BM25 + vector) is one SQL query away
- Works on every managed Postgres (Supabase, Neon, RDS, Aurora)
- No new system to monitor, back up, or secure
Tradeoffs (honestly)
- Index build time grows with dataset size
- Memory footprint of HNSW indexes is significant
- Beyond ~10M vectors, dedicated stores (Pinecone, Qdrant) start winning
- Filtered search performance depends heavily on index strategy
Fit assessment
When to reach for pgvector
Pick the right tool for the job.
Best fits
RAG pipelines under 10M vectors
Multi-tenant search where row-level filtering matters
Hybrid keyword + semantic retrieval in one query
Recommendations co-located with product data
Teams that already operate Postgres at scale
Not ideal for
Workloads with 100M+ vectors and tight latency SLOs
Pure-vector workloads with no relational data
Teams without Postgres operational expertise
Common use cases
Resources
Learn more
Curated official docs, tutorials, and writing on pgvector.
Services
Where I apply pgvector
Engagements where this technology shows up regularly.
AI Engineering
End-to-end AI integration from prototyping to production. I build custom LLM pipelines, RAG systems, and intelligent agents that solve real business problems-not just demos.
Data Engineering
Modern data infrastructure that actually gets used. I build data pipelines, warehouses, and analytics platforms that transform raw data into business intelligence.
Case Studies
pgvector in production
Real engagements where this technology shaped the outcome.
AI Document Processing Platform
An AI-powered document processing system that transformed how a legal team handled contract review, due diligence, and compliance.
AI-Powered Enterprise Search
An AI-powered search platform that unifies search across dozens of enterprise systems with natural-language understanding and contextual results.
Browse the full case study archive.
Stack
Pairs well with pgvector
Tools and platforms I commonly combine with this one.
Databases
More in this category
Where data lives - relational, document, in-memory, and vector.
Need help with pgvector?
Whether you're starting fresh or optimizing an existing implementation, I can help you get the most out of this technology. Read more in insights or get in touch.