Ryz Labs/Guides/pgvector vs Weaviate
Guides

pgvector vs Weaviate: Postgres extension or dedicated vector database

pgvector keeps embeddings next to your relational rows; Weaviate is an open-source database designed around vectors, hybrid search and tenants. Here is how to choose.

Choose pgvector when your application data already lives in PostgreSQL, a single query needs to join embeddings with permissions and business columns, and your collection is in the millions of vectors. Choose Weaviate when search is the product: you need keyword and vector ranking fused in one call, thousands of isolated tenants, built-in vectorizers, or quantization that keeps very large collections affordable. Both are open source, so the real decision is whether vector search should be one feature of your relational database or a service of its own.

At a glance

FactorpgvectorWeaviate
What it isPostgreSQL extension adding vector types, distance operators and ANN indexesStandalone vector database written in Go
Current release0.8.7, supports Postgres 13 and newer1.40.3 (October 28, 2026), with patch lines maintained back to 1.36
LicenseOpen source, free to run anywhere Postgres runsBSD 3-Clause for most of the repository
Index typesHNSW and IVFFlatHNSW (default), flat, dynamic (experimental) and HFresh (disk-based, since 1.36)
Vector typesvector, halfvec, bit, sparsevecDense vectors, with multiple named vectors per object
Keyword plus vectorCombine with Postgres full-text search; you write the fusion SQLNative hybrid query fusing BM25F and vector scores, tunable with alpha
Compressionhalfvec (half precision) and binary quantization via bit type and expression indexesPQ, SQ, BQ and rotational quantization (RQ), opt-in
Multi-tenancyRow-level security, partitions or schemasBuilt-in tenants per collection, each with its own shard
Embedding generationDone in your application codeOptional vectorizer modules call model providers at import and query time
Managed optionAny managed Postgres that ships the extensionWeaviate Cloud: Free, Flex (from $45 a month), Premium

Two different design centers

pgvector treats an embedding as another column. You add a vector(1536) field to a table, build an index, and order rows by a distance operator. Everything Postgres already gives you comes along: transactions, foreign keys, row-level security, point-in-time recovery, logical replication and the SQL your team writes daily. The pgvector README lists six distance operators (L2, inner product, cosine, L1, Hamming and Jaccard) and four types: vector, halfvec, bit and sparsevec.

Weaviate starts from the opposite assumption: the object and its vectors are the primary record, and the database is organized around retrieval. A collection can hold several named vectors per object (say, one for the title and one for the body), each with its own index and compression,, keyword indexes for BM25F, and a schema for filtering. Per the Weaviate repository, it ships replication, RBAC, built-in multi-tenancy, and optional generative and reranking modules. You run it as a separate cluster, either yourself on Kubernetes or through Weaviate Cloud.

That difference drives almost every trade-off below. pgvector wins on simplicity of data management. Weaviate wins on retrieval features you would otherwise build yourself.

Performance

Index behavior and limits

In pgvector, HNSW is the index most teams pick. Its defaults are m = 16, ef_construction = 64 and hnsw.ef_search = 40, and you raise ef_search per session to trade latency for recall. There is a hard ceiling to plan around: HNSW indexes a vector column only up to 2,000 dimensions, while halfvec raises that to 4,000. If your embedding model outputs 3,072 dimensions, you either store half precision, reduce dimensions at the model, or index an expression cast to halfvec. Weaviate does not impose that 2,000-dimension index cap, which matters for teams on large embedding models.

Weaviate's vector index documentation describes four index types. HNSW is the default; flat suits small collections; dynamic starts flat and converts to HNSW past a threshold; HFresh, added in 1.36, keeps most data on disk with a small in-memory centroid index. That menu lets one cluster serve both tiny tenants and large shared collections efficiently.

Filtered search

Filters are where many first deployments go wrong. With approximate indexes, Postgres retrieves the nearest candidates and then applies your WHERE clause, so a restrictive filter (one customer out of 10,000) can return fewer rows than your LIMIT. pgvector 0.8.0 added iterative index scans to fix this: set hnsw.iterative_scan to strict_order or relaxed_order and the scan keeps going until enough rows pass, bounded by hnsw.max_scan_tuples (default 20,000). Partial indexes or partitioning by tenant are the other standard fixes. Weaviate applies filters as part of the search and isolates tenants into their own shards, so per-tenant queries do not compete with a global index.

Memory and quantization

Both systems are fastest when the graph fits in RAM. pgvector's main lever is precision: halfvec halves storage, and binary quantization with a re-ranking step on full vectors cuts it much further. Weaviate offers more options. Its quantization docs list scalar quantization at 4x reduction, product quantization at roughly 24x in their 768-dimension example, binary quantization at 32x, and rotational quantization in 8-bit (4x), 4-bit (about 8x) and 1-bit (close to 32x) variants. None is on by default; you enable it per collection or through the DEFAULT_QUANTIZATION setting introduced in 1.33. Always measure recall on your own queries after compressing.

Hybrid search and retrieval quality

Most production retrieval needs both keyword and semantic matching: product codes, ticket IDs and legal citations match on exact tokens, while paraphrased questions match on meaning. Weaviate makes this one call. Its hybrid search runs BM25F and vector search in parallel and merges them; relative score fusion has been the default since 1.24, with ranked fusion as an alternative. The alpha parameter sets the balance: 1 is pure vector, 0 is pure keyword.

In Postgres you assemble the same thing. A typical pattern is a CTE that ranks by ts_rank on a tsvector column, another that ranks by cosine distance, and a reciprocal rank fusion in SQL. It works, it is transparent, and your team controls every weight. It is also code you own, test and tune, and native Postgres full-text ranking is not BM25, so expect to evaluate quality carefully or add an extension. If you are still deciding whether retrieval is even the right approach, read RAG vs fine-tuning, and add a reranking stage in either stack before tuning index parameters.

Ecosystem

Cost

pgvector has no license fee. You pay for the Postgres instance, and vectors mostly cost memory: as a rough sizing check, one million 1,536-dimension float vectors is about 6 GB of raw data before index overhead, half that as halfvec. The hidden cost is contention, since a heavy similarity workload on your primary can slow transactional queries, so many teams move it to a read replica.

Self-hosted Weaviate is free software that you run on your own nodes. Weaviate Cloud lists three plans as of October 2026:

Because Weaviate Cloud bills on stored dimensions, compression and dimension choice change the bill directly. A 3,072-dimension model costs twice as much to store as a 1,536-dimension one, before any quality gain is proven. Run an evaluation before choosing the larger model.

Hiring market

Postgres skills are everywhere. In the 2025 Stack Overflow Developer Survey, 55.6% of respondents reported using PostgreSQL, the highest of any database. That pool is the main argument for pgvector: almost any backend engineer can read the schema, and your DBAs already know how to back it up. The scarce skill is vector-specific tuning, meaning index parameters, memory sizing, filtered-search behavior and recall measurement.

Weaviate expertise is narrower. The survey does not list it, and the pool of engineers who have run a Weaviate cluster through upgrades, resharding and backup restores is thin. When you hire for it, look for retrieval engineers who have shipped hybrid search and can explain their fusion and evaluation choices, not only people who have run the quickstart. Our vector database engineers and SQL developers pages describe the profiles, and LLM engineer rates shows current pay ranges for the adjacent role.

When to pick pgvector

When to pick Weaviate

A common pattern is to start on pgvector, build a retrieval evaluation set, and move only when the numbers show a specific gap: hybrid quality, tenant isolation or scale. If you are also weighing a fully managed proprietary service, see Pinecone vs pgvector.

Migration notes

How Ryz fits

Ryz Labs engineers have shipped retrieval on both stacks. Only the top 1% of the tens of thousands of engineers we interview make it, and they join your team on US business hours. You can hire RAG engineers individually, or bring in one of our AI pod teams, dedicated senior engineers who build the AI system in your cloud and repos, from ingestion and embeddings through evaluation and production monitoring. Our RAG development services page covers the scope.

Typical cost is $7,000 to $15,000 per engineer per month: mid-level engineers run $7,000 to $10,000, seniors $10,000 to $15,000, and leads are quoted per team. If you want a hosted retrieval platform that your team configures without engineers who build, a platform vendor is the better fit.

Related

FAQ

Is pgvector fast enough for production?

Yes, for most enterprise retrieval workloads in the millions of vectors. Use an HNSW index, give the instance enough memory to hold it, enable iterative index scans for filtered queries, and move heavy search traffic to a read replica if it competes with transactional load.

Does pgvector support hybrid search like Weaviate?

Not as a single built-in query. You combine Postgres full-text search with vector distance and fuse the rankings in SQL, often with reciprocal rank fusion. Weaviate does this natively with BM25F and a tunable alpha parameter.

Is Weaviate free?

The database is open source under BSD 3-Clause for most of the repository, so self-hosting has no license fee. Weaviate Cloud has a free sandbox capped at 100,000 objects, and paid Flex plans start at $45 a month.

What is the dimension limit in pgvector?

You can store up to 16,000 dimensions, but HNSW and IVFFlat indexes cover a vector column only up to 2,000 dimensions. Half-precision halfvec columns can be indexed up to 4,000 dimensions.

Should I start with pgvector and switch to Weaviate later?

That is a sensible path if you already run Postgres. Build a retrieval evaluation set from real questions first, then switch only when measured results show a gap in hybrid quality, tenant isolation or scale that Postgres cannot close.

Questions we didn't answer? Email info@ryzlabs.com.

Thanks — your message has been sent. We’ll get back to you soon.

Something went wrong while sending your message. Please try again or email info@ryzlabs.com.

Explore Ryz Labs

Software development servicesAI development teamsIndustriesStaff augmentationAI pod teamsNearshore software developmentHire engineers by roleEngineer ratesGuidesBuyer guidesCase studiesHow we vet engineers

Ryz Labs

Senior engineers on your team. AI pod teams that ship.

Tell us what you're building. You get a scoped plan, a price and the names of the people who would do the work.

  • Only the top 1% of tens of thousands interviewed make it
  • On US business hours, including New York hours
  • Trusted by Fortune 500 engineering teams

Tell us who you need

A Ryz partner replies with a scoped team plan.

Start a conversation →

Prefer to talk? Book a 15-min call →