Urgent.News

What's breaking now, across thousands of outlets.

Tech

Pg_vectorsearch: An index that is faster than pgvector's IVFFlat and HNSW

PRISM is a PostgreSQL-native index access method that outperforms PostgreSQL's own IVFFlat and HNSW indexes for high-performance approximate nearest neighbor (ANN) search. Built on cutting-edge quantization, routing, and partitioning techniques, PRISM delivers significantly faster performance for both querying and index building, even when compared to graph-based HNSW on massive datasets.

Using a hierarchical centroid tree, PRISM partitions vectors into clusters and leverages the PostgreSQL buffer cache to keep the tree in memory, resulting in impressive speed gains. Vectors are RaBitQ-quantized and stored in optimized posting lists, enabling efficient SIMD distance computation and error bound-based vector elimination.

Two installation options are available: vec32 for full precision and vec16 for halved space usage, with matching operator classes. PRISM can be seamlessly integrated with existing pgvector vector or halfvec columns, requiring no changes to the table or queries. While inserting rows, lists grow but never split, and the prism_rebalance procedure can be used to split oversized lists in place.

Adjusting the prism.nprobe parameter is the only tuning required, with most deployments only modifying this setting.

Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at github.com →

More in Tech

Lockstep to pipeline in almost one line

  • Lockstep systems update sequentially, simplifying concurrency reasoning
  • Pipelining enables parallel phases, moving to pipelined tick system
  • Pipelined system maintains back pressure, read consistency through transactions

More from Wednesday 14 October →