Cost Models // SeatExit FinOps
PostgreSQL pgvector vs External Qdrant HNSW Memory Profile
pgvector simplifies small stacks (<150k chunks), while Qdrant int8 saves ~40-55% RAM and eliminates Postgres index-build memory spikes at 500k+.
Measured Unit Economics & Telemetry
Using pgvector inside PostgreSQL 16 consolidates chat rows and embeddings into one database. However, pgvector stores uncompressed float32/halfvec pages inside shared_buffers and requires multi-GB maintenance_work_mem during HNSW rebuilds. Qdrant isolates vector memory, supports native sparse+dense hybrid search, and quantizes to int8 cleanly.
| Resource / Billing Line | Audited Value | FinOps Impact |
|---|---|---|
| 100k Chunks: pgvector vs Qdrant | 515 MB vs 345 MB | Both fit easily on 8 GB KVM 2 |
| 500k Chunks: pgvector vs Qdrant | 1,455 MB vs 1,005 MB | Qdrant saves ~450 MB steady RAM |
| 1.0M Chunks: pgvector vs Qdrant | 2,630 MB vs 1,830 MB | Qdrant avoids Postgres shared_buffers thrash |
| Native Hybrid BM25 + Dense | Manual FTS join vs Native | Qdrant executes single-RPC hybrid scoring |
Implementation & Configuration Checklist
- Use pgvector Below 150k Chunks: If total corpus stays under ~3,000 PDFs, single-DB pgvector keeps backups atomic.
- Switch to Qdrant Above 250k Chunks: Set VECTOR_DB=qdrant once teams upload multi-department PDF archives.
- Tune shared_buffers Independently: Keep Postgres dedicated to relational chat/user state when Qdrant owns vectors.
VECTOR_DB=qdrant
QDRANT_URI=http://qdrant:6333
# Alternative <150k chunks:
# VECTOR_DB=pgvector
Team RAG Infrastructure FAQ
Can we migrate from pgvector to Qdrant later?
Yes, though changing vector stores requires re-indexing raw document collections into Qdrant.
Which storage backend benefits most from NVMe IOPS?
Both benefit, especially Qdrant during disk-backed float32 rescoring and Postgres during WAL commits.