Favicon of pgvectorscale

pgvectorscale

An open-source PostgreSQL extension adds DiskANN vector search, compression and label filtering to pgvector, with self-hosted and Timescale Cloud options.

pgvectorscale extends pgvector for developers who want to search large embedding datasets within PostgreSQL. It adds indexing and compression for AI applications that keep vector data in their existing database.

  • Vector indexing: StreamingDiskANN provides approximate nearest neighbor search based on Microsoft's DiskANN research, with an adjustable tradeoff between search accuracy and speed.
  • Compressed storage: Statistical Binary Quantization reduces the storage footprint of vector data.
  • Filtered search: Combine similarity search with indexed label filters or ordinary PostgreSQL WHERE conditions, including both approaches in the same query. Ordinary conditions use slower post-filtering that processes results as a stream without loading the entire result set into memory.

The extension is open source under the PostgreSQL License and requires pgvector. In a self-hosted deployment, vector storage and search run on your PostgreSQL server. Docker images are available, and source builds support Linux and ARM-based Macs. Building from source on Intel Macs isn't supported. Timescale Cloud also provides the extension in its hosted PostgreSQL service.

The search index uses relaxed distance ordering, so returned matches can be slightly out of order by distance. It doesn't support indexes on UNLOGGED tables.

Similar to pgvectorscale