PostgreSQL extension claims vector search index faster than pgvector's HNSW
Pg_vectorsearch: An index that is faster than pgvector's IVFFlat and HNSW
Timescale's pg_vectorsearch introduces PRISM, a PostgreSQL-native index for approximate nearest neighbor search. It uses RaBitQ quantization with error bounds and SIMD-optimized distance computation to outperform pgvector's IVFFlat and HNSW. On a 100-million-vector dataset, PRISM achieves equivalent recall faster than HNSW while using a quarter of the memory. The extension is in alpha, compatible with existing pgvector columns, and supports dynamic updates.
Compared to graph-based HNSW, PRISM is faster at equivalent recall on a 100-million-vector dataset, on an instance with a quarter of the memory.
- devy
A couple preliminary findings if you are considering adopting this extension to replace your previous pgvector's HNSW indexing.
- pg_vectorsearch uses a quantized IVF index called PRISM. PRISM caps at 1968 dimensions for vectors. If your previous HNSW index has more dimensions than that, you're SOL (at least for now until they fix that).
- pg_vectorsearch requires Postgres version 18 or above. If you run PG versions below that you need to migrate your database first. Many legacy PG production environment are way dated on PG 14 or 15, migration is prohibitively high cost to just try this out.
- pg_vectorsearch shipped yesterday and it's obviously alpha. Hasn't been battle tested in production environments outside of Timescale's. Also since it's so new, it isn't on Azure's allowed-extension list or any other Hyperscale's managed PG instances' allowed extension list. It takes time to graduate from alpha and mature. So if you run managaed PG instances from hyperscaler's cloud, you're SOL (at least for now until this matures into those ecosystems) or you have to migrate to a PG 18 self-hosted.
- EgregiousCube
I'm currently running VectorChord and I love it - with a fast backing disk, it's cut my postgres cost in half. Excited to see competition in low-RAM vector index tools. RAMageddon seems to be creating incentives to find more ways to take advantage of how fast modern nvme drives are!
- potomushto
Interesting, I see no mention of support for bit precision and hammer distance operator which supposed to be much faster and storage efficient
- arunmu
Didn't these guys also write pgvectorscale which seems to be unmaintained now ?
Why a new index instead of adding onto or improving pgvectorscale?
- Rapzid
Does it support filtering though?
Edit: post filtering only
I don't understand how people are efficiently implementing tenant/user/permission scopes with these indexes.