All posts
AI Engineering

pgvector on RDS, Measured: HNSW and IVFFlat Build Times and Latency on 50,000 Vectors

By

November 9, 2026

6 min read

On 50,000 vectors of 768 dimensions on a 2-vCPU RDS instance, an exact nearest-neighbour search took 133 ms. HNSW cut it to 1.9 ms after a 47-second build; IVFFlat to 1.8 ms after 2.4 seconds. What recall looked like, why our numbers are a floor, and how to size this for real embeddings.

Benchmark
Postgres Performance
pgvector
Vector Search

50,000 × 768 vectors

Median query

Index build

Exact (no index)

133 ms

None

HNSW (m = 16, ef_construction = 64)

1.9 ms

47.2 s

IVFFlat (50 lists)

1.8 ms

2.4 s

RDS Postgres 17 on db.m7g.large. Our measurements, November 2026.

The full report has p99 latencies, index sizes, measured recall at default settings, and why random test vectors understate recall compared with real embeddings.

Choosing a vector store?

We'll size pgvector against your corpus and query rate before you add another service. 30 minutes, free.

hoolco Monthly Review

Once a month: what changed in tech that month and what it means for you, from cloud and AI to security and the tools you build with. Every item links to its source. No sales pitch, unsubscribe in one click.

As of November 9, 2026. Provided as is, for general information, and accurate to the best of our knowledge on the date shown. Not legal, compliance, tax, financial or other professional advice. Prices, limits and vendor services change; check current vendor documentation before relying on anything here. Terms of use.