Prompt
What should I use for embeddings if I already run PostgreSQL?
Latest observation
Oct 7, 2026
OpenAI APIWeb search: off
If you already run PostgreSQL, the simplest and most practical choice is usually:
Use pgvector inside PostgreSQL.
Why this is a good default
- Keeps everything in one system: data, metadata, and embeddings together.
- Easier ops: no extra vector database to run or sync.
- Good enough for many apps: semantic search, RAG, recommendation, deduping, similarity matching.
- Works well with SQL: filter by user, tenant, time, tags, permissions, then do vector search.
Typical setup
- Store your embedding as a
vectorcolumn. - Index it with an ANN index:
- HNSW for better query performance / general use
- IVFFlat if you want a simpler/lighter index and can tune it
- Combine vector similarity with normal SQL filters.
When PostgreSQL + pgvector is a strong fit
- You have up to moderate scale.
- You want transactional consistency.
- Your application already depends heavily on PostgreSQL.
- You need hybrid search: text filters + embeddings.
- You want to avoid operational complexity.
When to consider a dedicated vector DB instead
If you need:
- Very large scale embeddings
- Very low-latency similarity search at high QPS
- Advanced vector-specific features
- Heavy write rates + large ANN workloads
- Multi-node vector search at significant scale
Then consider:
- Pinecone
- Weaviate
- Qdrant
- Milvus
- OpenSearch/Elasticsearch if you also need text search
Practical recommendation
- Start with PostgreSQL + pgvector.
- Only move to a dedicated vector store if you hit clear performance or scale limits.
If you want, I can also give you:
- a recommended pgvector schema,
- index choice guidance (HNSW vs IVFFlat), or
- a decision matrix comparing pgvector vs vector DBs.