Buying snapshot
Scroll sideways to see all columns. With a keyboard, focus this table and use the arrow keys.
| Decision point | What the project states |
|---|---|
License | PostgreSQL license. |
Installation | An extension for Postgres 13 or later. Compile it from source, or install it with Docker, Homebrew, PGXN, APT, Yum, pkg, APK or conda-forge; it comes preinstalled with Postgres.app and many hosted providers. Enable it in each database with CREATE EXTENSION vector. |
Latest release | 0.8.7, marked stable on 2026-10-01. |
Vector types and limits | Single-precision, half-precision, binary and sparse vectors. Indexes cover vector up to 2,000 dimensions, halfvec up to 4,000, bit up to 64,000 and sparsevec up to 1,000 non-zero elements; a stored vector can have up to 16,000 dimensions. |
Distance functions | L2, inner product, cosine and L1, plus Hamming and Jaccard for binary vectors. |
Client languages | Any language with a Postgres client. The project lists libraries for many languages, including Python, Go, Java, JavaScript, Rust and Ruby. |
Our take
Choose pgvector when your application data already lives in Postgres, self-managed or with a hosted provider that includes the extension, and you want vector search to stay in that database.
Evaluate pgvector
Popular comparisons
Where it stands out
Vectors and records in one database. Embeddings sit in normal tables, so you can join them with other data, filter with WHERE clauses, upsert rows and bulk-load with COPY. Replication and point-in-time recovery work through the Postgres write-ahead log.
Exact search by default, approximate when you choose. Without an index, pgvector returns exact results with perfect recall. HNSW gives the better speed-recall balance but builds more slowly and uses more memory; IVFFlat builds faster and uses less memory but has lower query performance.
Hybrid search with tools you already have. pgvector works with Postgres full-text search, and the project suggests Reciprocal Rank Fusion or a cross-encoder to combine the results.
Scaling paths inside Postgres. Half-precision vectors and binary quantization shrink the working set, and you can scale up a single server, add replicas, or shard with Citus or PgDog. A non-partitioned table holds up to 32 TB by default, and a partitioned table can have thousands of partitions of that size.
Trade-offs to weigh
Filtered queries can return too few rows. With approximate indexes, filtering happens after the index scan. If a condition matches 10% of rows, HNSW with the default ef_search of 40 returns only about 4 rows on average. Iterative index scans (from version 0.8.0), partial indexes or partitioning help, but you must set them up.
Tenants share index quality. If tenants share one approximate index, one tenant's vectors can affect recall and speed for the others. Isolating tenants means list partitioning or separate tables.
Tuning and upkeep are your job. HNSW builds take much longer once the graph no longer fits in maintenance_work_mem, vacuuming HNSW indexes can take a while, and in production you should build indexes concurrently to avoid blocking writes.
Public signals
About these signals
Verified factual signals from public sources. They indicate observable activity or interest, not total adoption, product quality, or cost.
104 GitHub commits 90d23.6k GitHub stars0 vulnerabilities across 2 packages
See all signals from 8 sources
npm · pgvector@0.3.1 · PyPI · pgvector@0.5.1
Alternatives to pgvector
The reviewed substitutes for pgvector among the vector databases, and what would make each one the better answer.
Direct alternatives
Reviewed substitutes: products bought for the same job, where a team picks one.
- LanceDB
- Choose this if you work with multimodal data, need versioned datasets, or want an embedded database that scales to petabytes without a server process.Applies to: Choosing between these two for the vector databases decision.
- Qdrant
- Choose this if you value Rust-level performance, need rich filtering on metadata alongside vector search, and want both self-hosted and managed options.Applies to: Choosing between two products of the same kind for one job.
- Turbopuffer
- pgvector and Turbopuffer store embeddings and return the nearest matches for semantic search and RAG. pgvector is an open-source PostgreSQL extension that keeps vectors in SQL tables, while Turbopuffer is a commercial serverless service for vector and full-text search that keeps data on object storage for large, cost-sensitive indexes.Applies to: Choosing between these two for the vector databases decision.
- Zilliz
- pgvector and Zilliz both store embeddings and answer similarity queries for AI applications. pgvector is an open-source PostgreSQL extension that teams install in their own database or get from a managed Postgres service, while Zilliz is a fully managed cloud service for the Milvus vector database, built for very large collections.Applies to: Choosing between these two for the vector databases decision.
- ChromaDB
- Storing embeddings for retrieval-augmented generation can be done in ChromaDB or in pgvector, since both are open source and keep vectors ready for similarity search. ChromaDB is a standalone embedding database with a simple Python API, while pgvector adds vector columns and indexes to PostgreSQL so embeddings sit next to relational data and are queried with SQL.Applies to: Choosing between these two for the vector databases decision.
Other approaches
A different approach to the same problem. Each substitutes only for the workload named beside it.
- Marqo
- Marqo optimises search conversion using click-stream, purchase and event data, creating a personalised experience that knows what your customers are looking for - better than they do.Applies to: For teams that build their own product search on a vector store rather than buying a hosted ecommerce search platform.
- Milvus
- Choose this if you need open-source flexibility with true horizontal scaling beyond what a single PostgreSQL instance can handle.Applies to: Whether embedding search can reuse an existing datastore or needs a dedicated vector service.
- Pinecone
- Choose this if you want zero operational overhead and need to scale beyond 50 million vectors without managing infrastructure.Applies to: Whether embedding search can reuse an existing datastore or needs a dedicated vector service.
- Weaviate
- Choose this if you want built-in embedding generation, hybrid search out of the box, and a GraphQL-based query interface.Applies to: Whether embedding search can reuse an existing datastore or needs a dedicated vector service.
- MongoDB Atlas Vector Search
- The trade-off is that a team moving from MongoDB must take on PostgreSQL-oriented data modeling and operational ownership. **pgvector** is an open-source PostgreSQL extension for vector similarity search and embedding storage.Applies to: for teams whose data model, governance, and engineering practices already revolve around PostgreSQL; vector data stays in the relational environment rather than moving into MongoDB Atlas.
Head to head
See detailed alternatives analysis
If you are running pgvector in PostgreSQL and hitting its scaling limits, dealing with operational complexity, or need features beyond what a database extension can provide, several strong pgvector alternatives exist across the vector database landscape. Whether you need a fully managed service, better multi-tenancy, or purpose-built distributed architecture, the right choice depends on your scale requirements, team expertise, and budget.
Top Alternatives Overview
Pinecone is a fully managed, purpose-built vector database that eliminates all infrastructure management. It supports billions of vectors with consistent low-latency queries and offers a free tier alongside usage-based pricing starting at $0.15 per hour for 4 cores. Pinecone handles index optimization, replication, and scaling automatically, which removes the PostgreSQL tuning burden entirely. Choose this if you want zero operational overhead and need to scale beyond 50 million vectors without managing infrastructure.
Milvus is an open-source distributed vector database written for horizontal scalability, with a cloud-native architecture separating storage and compute. It supports IVF, HNSW, and DiskANN index types, and scales to tens of billions of vectors. Milvus offers deployment flexibility from a lightweight pip-installable version (Milvus Lite) to full distributed clusters, with Zilliz Cloud providing a managed option starting free. Choose this if you need open-source flexibility with true horizontal scaling beyond what a single PostgreSQL instance can handle.
Qdrant is a high-performance vector search engine written in Rust, offering both self-hosted and cloud deployments. It provides advanced filtering capabilities, payload indexing, and efficient memory usage through quantization. Qdrant Cloud starts with a free tier and scales to $1 per month for basic usage, with enterprise options available. Choose this if you value Rust-level performance, need rich filtering on metadata alongside vector search, and want both self-hosted and managed options.
Weaviate is an open-source vector database with built-in vectorization modules that can generate embeddings automatically using integrated ML models. It supports hybrid search combining vector and keyword approaches, with multi-tenancy built in. Weaviate Cloud offers a free 14-day sandbox, Flex plans from $45/month, and Premium at $400/month. Choose this if you want built-in embedding generation, hybrid search out of the box, and a GraphQL-based query interface.
LanceDB is an open-source, serverless vector database built on the Lance columnar format designed for multimodal AI workloads. It runs embedded (no server needed), supports zero-copy versioning, and handles text, images, video, and point cloud data natively. LanceDB stores data on S3-compatible object storage for up to 100x cost savings compared to in-memory solutions. Choose this if you work with multimodal data, need versioned datasets, or want an embedded database that scales to petabytes without a server process.
Vespa is an open-source AI search platform that combines vector search with machine-learned ranking, real-time inference, and native tensor support. It handles both structured and unstructured data at enterprise scale with built-in distributed computing. Vespa is free to self-host, with managed cloud pricing available separately. Choose this if you need a full search and recommendation platform with real-time ML ranking, not just a vector store.
Architecture and Approach Comparison
pgvector operates as a PostgreSQL extension, meaning it inherits PostgreSQL's single-node architecture, ACID compliance, and WAL-based replication. This is a strength for teams already running PostgreSQL: you get vector search alongside relational data with full JOIN support, transactions, and point-in-time recovery. However, pgvector's HNSW index supports vectors up to 2,000 dimensions at full precision (4,000 at half-precision), and performance degrades beyond roughly 50 million vectors on a single node.
Purpose-built vector databases like Milvus and Qdrant use distributed architectures with separated storage and compute layers. Milvus distributes data across shards with stateless query nodes, while Qdrant uses a Rust-based engine optimized for memory-efficient vector operations. Both handle billions of vectors natively without the single-node bottleneck.
Pinecone and Turbopuffer take the fully managed approach. Turbopuffer stores vectors on S3-compatible object storage with SSD caching, achieving 10x reduced costs at the expense of slightly elevated cold-query latency (Launch tier at $16/month, Scale at $256/month). Pinecone abstracts everything behind an API with automatic index management.
LanceDB takes a fundamentally different approach with its embedded, serverless architecture built on the Lance columnar format. There is no server process to manage; it runs in-process and persists to object storage. Vespa, by contrast, is a full application platform with built-in document processing, tensor computation, and real-time ML model serving.
Pricing Comparison
Scroll sideways to see all columns. With a keyboard, focus this table and use the arrow keys.
| Tool | Self-Hosted Cost | Managed/Cloud Starting Price | Pricing Model |
|---|---|---|---|
| pgvector | Free (open-source) | Included with managed PostgreSQL providers | Open Source |
| Milvus | Free (open-source) | Free tier via Zilliz Cloud | Open Source / Enterprise |
| Qdrant | Free (open-source) | Free tier, then from ~$1/mo | Freemium |
| LanceDB | Free (open-source) | Contact for cloud pricing | Open Source |
| Vespa | Free (open-source) | Cloud pricing on vespa.ai | Open Source |
| Weaviate | Free (open-source) | $45/mo (Flex), $400/mo (Premium) | Freemium |
| Pinecone | N/A (managed only) | Free tier, then $0.15/hr per 4 cores | Usage-Based |
| Turbopuffer | N/A (managed only) | $16/mo (Launch), $256/mo (Scale) | Paid |
| Typesense | Free (open-source) | $0.03/hr (Cloud, smallest cluster; about $21.60/mo) | Freemium |
| Zilliz | N/A (managed Milvus) | Free tier, Enterprise from $197/mo (Dedicated) | Freemium |
pgvector has the lowest total cost of ownership when you already operate PostgreSQL infrastructure, since the extension itself is free. The managed alternatives add hosting costs but remove operational burden. Pinecone and Turbopuffer charge only for managed services with no self-hosted option, making them more expensive at scale but simpler to run.
When to Consider Switching
Switch from pgvector when your vector dataset exceeds 50 million rows and query latency becomes unacceptable despite HNSW tuning. Single-node PostgreSQL cannot horizontally shard vector indexes, so you hit a hard ceiling that purpose-built databases like Milvus or Pinecone handle natively.
Consider alternatives when you need vectors beyond 2,000 dimensions at full precision. pgvector caps HNSW indexing at 2,000 dimensions for standard vectors, while Milvus and Qdrant handle high-dimensional embeddings without architectural constraints.
If your team spends significant time tuning maintenance_work_mem, hnsw.ef_search, and ef_construction parameters, a managed service like Pinecone or Zilliz Cloud removes that operational burden entirely. The time saved on index tuning and PostgreSQL performance optimization often justifies the hosting cost.
Move to Weaviate or Marqo if you need built-in embedding generation. pgvector requires you to compute embeddings externally and insert them, while these platforms generate vectors from raw text or images using integrated ML models.
Choose LanceDB or Vespa when your workload involves multimodal data (images, video, audio) alongside text embeddings, or when you need real-time ML ranking as part of the retrieval pipeline.
Migration Considerations
Migrating from pgvector means exporting your vector data, which is stored as standard PostgreSQL arrays. Use COPY to export vectors in CSV or binary format, then convert to the target database's ingestion format. Most alternatives (Milvus, Qdrant, Weaviate) accept vectors as float arrays, making the data conversion straightforward.
The biggest migration cost is rewriting queries. pgvector uses SQL operators like <-> for L2 distance and <=> for cosine distance, all within standard PostgreSQL queries with JOINs and WHERE clauses. Purpose-built vector databases use their own query APIs (REST, gRPC, or client SDKs), so any application code using SQL-based vector search needs rewriting.
If you rely on pgvector's ACID transactions to keep vector data consistent with relational data in the same database, migration becomes more complex. You will need to manage data synchronization between your PostgreSQL tables and the external vector database, introducing eventual consistency concerns.
The learning curve varies significantly. Pinecone and Zilliz Cloud have the gentlest onboarding with simple API-based interfaces. Milvus and Qdrant require understanding their collection, partition, and index configuration models. Vespa has the steepest learning curve due to its application-platform approach with custom configuration language and document processing pipelines.
For teams not ready to fully migrate, a hybrid approach works well: keep pgvector for smaller vector datasets that benefit from SQL JOINs, and offload large-scale similarity search to a dedicated vector database. This avoids the all-or-nothing migration risk while addressing pgvector's scaling limitations.