
pgvector Performance: Benchmarks, Latency & Limits 2026
pgvector HNSW hits 270 QPS at 0.99 recall on 1M 1536-dim vectors on 16 cores, 470 on 32. Indexing caps at 2,000 dims, or 4,000 with halfvec. No vendor SLA.
pgvector Performance verdict
pgvector HNSW on a 16-core Supabase instance delivers 270 QPS at 0.99 recall on 1M 1536-dimensional OpenAI embeddings.
Scaling to 32 cores reaches 470 QPS. The standard vector type caps HNSW indexing at 2,000 dimensions, and halfvec extends this to 4,000 at half the memory cost.
Pick pgvector if your app already runs on Postgres and your embeddings are at or under 2,000 dimensions, or 4,000 with halfvec. HNSW gives excellent recall at practical QPS levels on mid-size instances. If you need a managed SLA, choose a hosted Postgres provider such as Supabase or Neon rather than running pgvector on bare hardware.
- pgvector provides no uptime SLA. The SLA depends entirely on the hosting provider, such as Supabase, Neon or RDS.
- The HNSW benchmark figures are from Supabase on ARM-based instances, so results on other hardware or cloud providers will differ.
- The standard vector type caps HNSW and IVFFlat indexing at 2,000 dimensions. Use halfvec for up to 4,000 dimensions, or bit for binary embeddings up to 64,000.
- The IVFFlat index must be created after populating the table with data. Adding vectors before the index exists means the index will not cover those rows.
- HNSW QPS (8XL, 0.99 recall)
- 470 QPS
- HNSW vs IVFFlat (speed-recall)
- HNSW wins
- Max dims (vector, indexed)
- 2,000
- Max dims (halfvec, indexed)
- 4,000
- GitHub stars
- 21.9k
Index types: HNSW vs IVFFlat
| Property | HNSW | IVFFlat |
|---|---|---|
| Query speed-recall tradeoff | Better (recommended) | Lower |
| Build time | Slower | Faster |
| Memory usage during build | Higher | Lower |
| Training data required | No (indexes empty tables) | Yes (create after populating table) |
| Key tuning parameter | ef_search (recall vs latency) | probes (subset of lists to search) |
| Parallel build support | Yes (max_parallel_maintenance_workers) | Yes (max_parallel_maintenance_workers) |
HNSW index parameters and defaults
| Parameter | Default | Effect |
|---|---|---|
| m | 16 | Max connections per layer; higher m improves recall but uses more memory |
| ef_construction | 64 | Candidate list size during graph build; higher = better index quality, slower build |
| ef_search | 40 | Candidate list at query time; raise for higher recall, lower for speed |
| hnsw.max_scan_tuples | 20000 | Upper bound on tuples scanned per iterative query (v0.8.0+) |
| m (Supabase optimized) | 32 | Used in Supabase production HNSW benchmark at 1M x 1536-dim; 35% QPS gain vs m=24 |
| ef_search (0.99 recall) | 100 | Supabase 1M-vector benchmark: ef_search=100 reaches accuracy@10=0.99 with m=32, ef_construction=80 |
Supabase HNSW benchmark (1M x 1536-dim, inner product)
| Instance | Cores / RAM | QPS | Recall @10 |
|---|---|---|---|
| Supabase 2XL | 8-core ARM / 32 GB | ~180 | 0.99 |
| Supabase 4XL | 16-core ARM / 64 GB | 270 | 0.99 |
| Supabase 8XL | 32-core ARM / 128 GB | 470 | 0.99 |
| Supabase 16XL | 64-core ARM / 256 GB | ~1800 | 0.91 |
| vs Pinecone p1.x2 (3 pods) | $480/mo Pinecone | 4x Pinecone QPS | 0.99 |
| vs Pinecone s1 (6 pods) | $480/mo Pinecone | 1185% more QPS, $70 cheaper | 0.98 |
Vector type dimension and storage limits
| Type | Max dimensions (index) | Max dimensions (storage) | Storage bytes per vector |
|---|---|---|---|
| vector (float32) | 2,000 | 16,000 | 4 x dims + 8 bytes |
| halfvec (float16) | 4,000 | 16,000 | 2 x dims + 8 bytes |
| bit (binary) | 64,000 | 64,000 | dims / 8 + 8 bytes |
| sparsevec | 1,000 non-zero elements | 16,000 non-zero elements | 8 x non-zero + 16 bytes |
| IVFFlat indexable | 2,000 (vector), 4,000 (halfvec), 64,000 (bit) | same | same as type |
| HNSW indexable | 2,000 (vector), 4,000 (halfvec), 64,000 (bit) | same | same as type |
Distance operators and applicable vector types
| Operator | Distance type | Applicable types | Notes |
|---|---|---|---|
| <-> | L2 (Euclidean) | vector, halfvec | Default; measures spatial distance |
| <#> | Inner product (negative) | vector, halfvec | Returns negative value; fastest for normalized vectors |
| <=> | Cosine | vector, halfvec | Requires normalized vectors for correct results |
| <+> | L1 (Taxicab/Manhattan) | vector, halfvec | Added v0.7.0 |
| <~> | Hamming | bit | Binary vectors only |
| <%> | Jaccard | bit | Binary vectors only |
Benchmarked standing and adoption
- In Supabase's benchmark pgvector HNSW delivered over 4x the QPS of a comparable Pinecone p1.x2 setup
- Against a 6-pod Pinecone s1 setup, pgvector HNSW reached 1185% more queries per second while costing $70 less per month
- On 1M OpenAI 1536-dim embeddings a 16-core instance sustains 270 QPS at 0.99 recall@10
- Supabase's production HNSW config (m=32, ef_construction=80) lifts QPS about 35% over m=24 at the same recall
- pgvector has 21.9k GitHub stars and 1.2k forks as of 2026-06-24, the most-starred PostgreSQL vector extension
- pgvector v0.8.3 is the current stable release, shipped June 18, 2026
Operational characteristics and durability
- pgvector is a PostgreSQL extension usable from any language with a Postgres client, so durability, backups and replication come from the host Postgres rather than a separate pgvector service
- HNSW index builds use parallel workers (max_parallel_maintenance_workers) for faster construction
- HNSW builds significantly faster when the graph fits in maintenance_work_mem; build indexes after loading initial data
- Non-partitioned tables hold up to 32 TB; partitioned tables extend capacity for larger datasets
- Iterative index scans (v0.8.0+) improve recall on filtered queries; hnsw.max_scan_tuples defaults to 20,000 and can be raised
- HNSW indexes need no training step and can be created on empty tables, unlike IVFFlat which must be built after data is loaded
pgvector Performance FAQ
What index types does pgvector support?
Two: HNSW and IVFFlat. HNSW gives better query speed-recall trade-offs and can index empty tables before data is loaded. IVFFlat builds faster, uses less memory, and requires data to be loaded before index creation. HNSW is recommended for most production workloads.
How does pgvector HNSW perform on 1 million vectors?
On Supabase with 1M OpenAI embeddings at 1536 dimensions, pgvector HNSW delivers about 270 QPS at 0.99 recall on a 16-core 4XL instance. It reaches 470 QPS at 0.99 recall on a 32-core 8XL instance, per the Supabase HNSW benchmark blog.
What are the key HNSW tuning parameters?
Three build-time parameters: m, defaulting to 16, the max connections per layer, ef_construction, defaulting to 64, the graph build quality, and ef_search, defaulting to 40, the query-time recall-versus-speed knob. Raise ef_search to improve recall without rebuilding the index. In Supabase production benchmarks, m=32 with ef_search=100 reached 0.99 recall at 270 QPS on a 4XL instance.
What is the dimension limit for pgvector?
The standard vector type supports up to 2,000 dimensions for HNSW and IVFFlat indexes. halfvec, at half precision, extends this to 4,000 dimensions at half the memory cost. For binary embeddings, the bit type supports up to 64,000 dimensions. Storage-only, with no index, supports up to 16,000 dimensions for vector and halfvec.
Does pgvector offer an SLA or uptime guarantee?
No. pgvector is an open-source PostgreSQL extension, not a managed service, so it carries no vendor SLA. Uptime, backups and failover depend entirely on the hosting provider, such as Supabase, Neon, Amazon RDS, or a self-hosted Postgres deployment.
Which distance operators does pgvector support?
Six operators. L2 uses <->, inner product uses <#> and returns a negative value, and cosine uses <=>. L1 or Taxicab uses <+>, added in v0.7.0, while Hamming uses <~> and Jaccard uses <%>, both binary only. For normalized vectors such as OpenAI embeddings, inner product is generally fastest.
Sources & verification
| Source | What was checked | Last checked |
|---|---|---|
| GitHub Pgvector Pgvector | Official product page | July 10, 2026 |
| GitHub Master README.Md | Master Readme.md | July 10, 2026 |
| Supabase Blog Increase Performance Pgvector Hnsw | Independent reference | July 10, 2026 |
| Supabase Blog Pgvector Performance | Independent reference | July 10, 2026 |
| Supabase Blog Pgvector Vs Pinecone | Independent reference | July 10, 2026 |
Every fact on this pgvector page is tied to a named source and a verification date. Freshness-sensitive figures trace to the sources above; verify against the vendor before relying on them.
Explore pgvector
Every page on pgvector in one place, you are on performance.
Snapshot, score and verdict
Framework/SDK integrations for retrieval workloads
You are here
Every tier and the entry price
Compared and ranked vs peers
Price and feature change history
Browse the full Vector Databases category
