Prompt
do i need pgvector or is postgres enough for embeddings?
Latest observation
Oct 9, 2026
OpenAI APIWeb search: off
Usually Postgres is enough at first — you only need pgvector if you want fast, native similarity search inside Postgres.
Use plain Postgres if:
- You’re just storing embeddings as arrays/JSON
- You have small volume or low search frequency
- You’ll do search elsewhere (app code, external vector DB, etc.)
- You don’t need efficient nearest-neighbor queries yet
Use pgvector if:
- You want to run queries like “find the top 10 most similar items” directly in SQL
- You have many embeddings and need performance
- You want indexes for approximate nearest-neighbor search
- You want to keep everything in one database
Key difference
Plain Postgres can store embeddings, but it’s not good at vector similarity search by itself.
pgvector adds:
- a
vectorcolumn type - similarity operators / distance functions
- indexes like HNSW or IVFFlat
Practical rule
- Prototype / small scale: plain Postgres is fine
- Production semantic search / RAG / recommendations: use pgvector
If you want, I can also show:
- a plain Postgres schema for embeddings, and
- the same schema using pgvector.