Database / pgvector basics Interview Questions
How does pgvector compare to dedicated vector databases like Pinecone, Weaviate, and Qdrant?
pgvector vs dedicated vector databases is one of the most common architectural decisions for AI applications. The right choice depends on scale, existing infrastructure, and feature requirements.
| Factor | pgvector | Dedicated (Pinecone/Weaviate/Qdrant) |
|---|---|---|
| Data co-location | Same DB as relational data - easy JOINs | Separate system - sync required |
| ACID transactions | Full PostgreSQL ACID | Varies; often eventual consistency |
| Operational complexity | One system to operate | Additional system to manage and scale |
| Performance at scale | Good; ~100M vectors feasible with tuning | Optimised for billions of vectors |
| Filtering | Native SQL WHERE clauses | Specialised metadata filtering APIs |
| Recall tuning | ef_search, probes parameters | Managed, less exposed to user |
| Cost | PostgreSQL hosting cost only | Additional vector DB subscription |
| Maturity | PostgreSQL is battle-tested | Newer; some have production track record |
| Multi-tenancy | Schema/RLS-based | Often built-in |
| Hybrid search | BM25 + vector via pg_bm25/ParadeDB | Often built-in |
Decision guide:
- Use pgvector when you already use PostgreSQL, need transactional consistency, have <100M vectors, and want to minimise infrastructure complexity
- Use a dedicated vector database when you have hundreds of millions or billions of vectors, need managed scaling, or require specialised features not available in pgvector
More Related questions...