Prompt
Do I need to store embeddings in the same DB as my app data?
Latest observation
Oct 10, 2026
OpenAI APIWeb search: off
No—you don’t need to store embeddings in the same database as your app data.
Common options
-
Same DB
- Simpler to manage
- Easier joins/filters with metadata
- Good for smaller systems or when using a DB with vector support
-
Separate vector DB / index
- Better if you have lots of embeddings or high-dimensional similarity search
- Can scale independently
- Often faster for retrieval use cases
-
Hybrid
- App data stays in your main DB
- Embeddings + vector search in a dedicated vector store
- Store only the embedding record ID and metadata in the main DB
Typical best practice
- Keep source-of-truth app data in your main relational DB
- Store embeddings where they’re most efficient to query
- Link them with a stable ID
Use the same DB if:
- You want simplicity
- Your dataset is small/medium
- Your database supports vectors well (e.g. Postgres with pgvector)
Use a separate DB if:
- You expect large-scale similarity search
- You need specialized vector indexing/performance
- You want to isolate workloads
If you want, I can recommend an architecture based on your stack (Postgres, MongoDB, Pinecone, etc.).