Skip to content
GitHub·

🔍PostgreSQL Announces pg_vectorsearch for High-Performance ANN Search

PostgreSQL's new extension promises faster vector searches

TL;DR

PostgreSQL's new pg_vectorsearch extension offers high-performance approximate nearest neighbor (ANN) search. Currently in alpha, it's faster than pgvector's IVFFlat and HNSW for querying and index building. Developers should test it for vector-heavy workloads.

PostgreSQL just launched pg_vectorsearch, an alpha extension for high-performance approximate nearest neighbor (ANN) search. It's significantly faster than pgvector's IVFFlat and HNSW for both querying and index building. If you're working with large vector datasets, this could be a game changer. The PRISM index, implemented in C, uses a hierarchical centroid tree and RaBitQ encoding for optimized SIMD distance computation. It's compatible with PostgreSQL 18+, GNU C11, and Meson build system. Test it now, but don't use it in production yet.

PostgreSQL Announces pg_vectorsearch for High-Performance ANN Search — GitHub

Key Points

1

pg_vectorsearch is an alpha extension for PostgreSQL 18+, offering high-performance ANN search.

2

PRISM index uses a hierarchical centroid tree and RaBitQ encoding for optimized SIMD distance computation.

3

PRISM index is significantly faster than pgvector's IVFFlat and HNSW for querying and index building.

4

PRISM index has a tuning knob for balancing recall and speed, and a maintenance procedure called prism_rebalance.

5

pg_vectorsearch requires GNU C11 compiler and Meson build system, with optional CBLAS for faster RaBitQ encoding.

Why It Matters

If you're working with large vector datasets in PostgreSQL, pg_vectorsearch could significantly speed up your queries and index building. The PRISM index's hierarchical centroid tree and RaBitQ encoding make it faster than existing solutions like pgvector's IVFFlat and HNSW. However, it's currently in alpha, so only test it in non-production environments. Developers should keep an eye on future updates for production readiness.

PostgreSQLpg_vectorsearchANNPRISMRaBitQ

Comments

Subscribe to join the conversation...

Be the first to comment

Enjoyed this article?

Get it daily. 7am. Free. Reads in 5 minutes.

Join 3,568 builders reading daily.

Also get