RAG & Vector Database Cost Calculator
Size vector storage, HNSW index RAM, one-time embedding ingestion cost, and monthly hosting across PostgreSQL pgvector and managed vector databases.
Corpus & Retrieval Volume
Storage, RAM & Monthly Vector DB Cost
80,000 chunksKeeping vectors inside PostgreSQL lets you combine HNSW semantic search with GIN full-text search (Reciprocal Rank Fusion) and Row-Level Security tenant isolation in a single ACID database—no dual-write sync bugs.
Frequently Asked Questions
How much RAM does an HNSW index need in pgvector?+
Plan on roughly 1.5x to 1.8x the raw float32 vector size in RAM so the HNSW graph stays memory-resident for sub-20ms retrieval latency.
When should I use PostgreSQL pgvector instead of a separate vector DB?+
For most applications under tens of millions of vectors, pgvector eliminates dual-write consistency bugs, supports hybrid keyword + semantic search, and enforces tenant isolation via Row-Level Security.
Can we generate embeddings locally without paying OpenAI?+
Yes. Models like nomic-embed-text and bge-m3 run cleanly inside Ollama or local Python workers for zero per-token embedding cost.