pgvector performance
★★★★ 3.9 CE

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

Verified today·5 sources checked

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.

How to size it

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.

Honest limits
  • 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
View sources

Index types: HNSW vs IVFFlat

PropertyHNSWIVFFlat
Query speed-recall tradeoffBetter (recommended)Lower
Build timeSlowerFaster
Memory usage during buildHigherLower
Training data requiredNo (indexes empty tables)Yes (create after populating table)
Key tuning parameteref_search (recall vs latency)probes (subset of lists to search)
Parallel build supportYes (max_parallel_maintenance_workers)Yes (max_parallel_maintenance_workers)

HNSW index parameters and defaults

ParameterDefaultEffect
m16Max connections per layer; higher m improves recall but uses more memory
ef_construction64Candidate list size during graph build; higher = better index quality, slower build
ef_search40Candidate list at query time; raise for higher recall, lower for speed
hnsw.max_scan_tuples20000Upper bound on tuples scanned per iterative query (v0.8.0+)
m (Supabase optimized)32Used in Supabase production HNSW benchmark at 1M x 1536-dim; 35% QPS gain vs m=24
ef_search (0.99 recall)100Supabase 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)

InstanceCores / RAMQPSRecall @10
Supabase 2XL8-core ARM / 32 GB~1800.99
Supabase 4XL16-core ARM / 64 GB2700.99
Supabase 8XL32-core ARM / 128 GB4700.99
Supabase 16XL64-core ARM / 256 GB~18000.91
vs Pinecone p1.x2 (3 pods)$480/mo Pinecone4x Pinecone QPS0.99
vs Pinecone s1 (6 pods)$480/mo Pinecone1185% more QPS, $70 cheaper0.98

Vector type dimension and storage limits

TypeMax dimensions (index)Max dimensions (storage)Storage bytes per vector
vector (float32)2,00016,0004 x dims + 8 bytes
halfvec (float16)4,00016,0002 x dims + 8 bytes
bit (binary)64,00064,000dims / 8 + 8 bytes
sparsevec1,000 non-zero elements16,000 non-zero elements8 x non-zero + 16 bytes
IVFFlat indexable2,000 (vector), 4,000 (halfvec), 64,000 (bit)samesame as type
HNSW indexable2,000 (vector), 4,000 (halfvec), 64,000 (bit)samesame as type

Distance operators and applicable vector types

OperatorDistance typeApplicable typesNotes
<->L2 (Euclidean)vector, halfvecDefault; measures spatial distance
<#>Inner product (negative)vector, halfvecReturns negative value; fastest for normalized vectors
<=>Cosinevector, halfvecRequires normalized vectors for correct results
<+>L1 (Taxicab/Manhattan)vector, halfvecAdded v0.7.0
<~>HammingbitBinary vectors only
<%>JaccardbitBinary 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

Verified by ComparEdgeMethod: Vendor docs, official pages, and selected independent sources
SourceWhat was checkedLast checked
GitHub Pgvector PgvectorOfficial product pageJuly 10, 2026
GitHub Master README.MdMaster Readme.mdJuly 10, 2026
Supabase Blog Increase Performance Pgvector HnswIndependent referenceJuly 10, 2026
Supabase Blog Pgvector PerformanceIndependent referenceJuly 10, 2026
Supabase Blog Pgvector Vs PineconeIndependent referenceJuly 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.