Prompt
redis vector search vs pgvector
Latest observation
Oct 7, 2026
OpenAI APIWeb search: off
Here’s the practical comparison:
TL;DR
- pgvector is usually the better default if you already use PostgreSQL and want a solid, simpler, more SQL-native vector search setup.
- Redis Vector Search is better when you need very low latency, high throughput, or you’re already heavily using Redis as an in-memory/real-time system.
- If you’re building a typical app with embeddings + filters + transactional data, Postgres + pgvector is often the most straightforward choice.
Core differences
1) Data model and ecosystem
pgvector
- Runs inside PostgreSQL.
- Best when vectors live alongside relational data.
- You can use normal SQL joins, transactions, constraints, and mature tooling.
Redis Vector Search
- Runs in Redis Stack / RediSearch.
- Works well for cache-like, ephemeral, or real-time retrieval use cases.
- Great if your architecture already uses Redis as a primary low-latency layer.
2) Performance and latency
Redis
- Typically lower latency because it’s in-memory.
- Often better for real-time recommendations, semantic caching, and chat retrieval where speed matters a lot.
Postgres + pgvector
- Usually slower than Redis for raw similarity lookup, but can still be very fast with the right index and tuning.
- Good enough for many production workloads, especially if dataset size is moderate.
3) Scalability and operational complexity
pgvector
- Simpler operationally if you already run Postgres.
- One database for vectors + metadata + transactional data.
- Scaling can become more complex as vector workload grows.
Redis
- Easy for fast access, but memory cost can be high because data is in RAM.
- Scaling large vector datasets can get expensive.
4) Querying and filtering
pgvector
- Strong advantage here: full SQL filtering, joins, aggregations.
- Very convenient for hybrid queries like:
- “Find top 10 similar docs where tenant_id = X and created_at > Y.”
Redis Vector Search
- Supports metadata filtering too, but not as naturally or flexibly as SQL.
- Good for search-style filtering, but less powerful than relational querying.
5) Persistence and durability
pgvector
- Inherits PostgreSQL durability and transaction guarantees.
Redis
- Persistent options exist, but Redis is still commonly used as an in-memory system.
- Great for speed, but not always the first choice for durable primary storage.
6) Indexing options
pgvector
- Supports approximate nearest neighbor methods like HNSW and IVFFlat.
- Good recall/performance tradeoffs.
Redis
- Uses vector similarity indexing in RediSearch.
- Also supports approximate search and filtering efficiently.
When to choose pgvector
Choose pgvector if:
- You already use PostgreSQL.
- You want one system for vectors + metadata + business data.
- You need strong transactional consistency.
- Your app needs complex filters/joins.
- Your vector workload is moderate.
Typical use cases:
- RAG over document store + app metadata
- Product search with embeddings
- Multi-tenant apps with SQL constraints
- Internal tools and SaaS apps
When to choose Redis Vector Search
Choose Redis if:
- You need extremely low latency.
- You’re already using Redis for caching/session/state.
- You need real-time retrieval, ranking, or semantic caching.
- Your dataset fits memory economics.
Typical use cases:
- Semantic cache
- Real-time recommendation
- Chat memory / session retrieval
- Fast ephemeral search layer
Cost considerations
- Redis can get expensive for large vector collections because RAM is costly.
- Postgres is usually cheaper for storing large persistent datasets.
- If cost efficiency and storage size matter, pgvector often wins.
Rule of thumb
- Start with pgvector if you’re unsure.
- Use Redis if latency is critical and the dataset is small enough or already lives in Redis.
- Some teams use both:
- Postgres/pgvector as source of truth
- Redis as a fast cache or serving layer
Simple recommendation
If you’re building an app today and asking “which should I use?”:
- Most apps: pgvector
- High-performance real-time systems: Redis
- At scale with both durability and speed: Postgres + Redis hybrid
If you want, I can also give you:
- a feature-by-feature table,
- a benchmark-style comparison, or
- a recommendation based on your exact workload.