pg_vectorsearch是一个PostgreSQL扩展,提供名为PRISM的高性能向量索引方法1。该索引采用分层路由、RaBitQ量化和SIMD优化等技术1,在100百万向量规模的数据集上,查询和索引构建速度均显著超过pgvector的IVFFlat和HNSW方法,内存占用也更低1。
PRISM索引支持IVF风格的向量检索1。其中RaBitQ量化具有两阶段搜索的理论误差界1。SIMD优化支持AVX2、AVX512和NEON指令集1,并支持插入、更新和删除等动态更新操作1。相比HNSW方法,在100百万向量数据集上可用四分之一的内存实现更快的查询速度1。该扩展与pgvector兼容,用户可直接在现有的vector和halfvec列上构建索引1。
pg_vectorsearch目前处于alpha测试阶段,仅用于测试,不适合生产环境使用1。该扩展需要PostgreSQL 18及以上版本、GNU C11编译器和Meson构建系统1。
Pg_vectorsearch, a PostgreSQL extension currently in alpha testing, introduces PRISM, a high-performance vector indexing method designed to surpass the query and indexing speeds of pgvector's existing IVFFlat and HNSW approaches 1. The extension leverages hierarchical routing, RaBitQ quantization, and SIMD optimization techniques to achieve superior performance while consuming less memory 1.
PRISM is engineered to handle vector datasets at the 100-million scale 1. It incorporates RaBitQ quantization with theoretical error bounds across a two-stage search process 1, and supports SIMD optimization across AVX2, AVX512, and NEON instruction sets 1. When compared to HNSW on a 100-million vector dataset, PRISM delivers faster query speeds while requiring only one-quarter of the memory 1. The extension maintains compatibility with pgvector, allowing indexes to be built directly on existing vector and halfvec columns 1.
The extension also supports dynamic updates, enabling insertions, updates, and deletions within the indexed data 1. Pg_vectorsearch requires PostgreSQL 18 or later, a GNU C11-compatible compiler, and the Meson build system 1. As the project remains in alpha status, it is intended for testing purposes only and is not recommended for production environments 1.
评论
还没有评论,欢迎留下第一条。