pgvectorscale  by timescale

Postgres extension for high-performance, cost-efficient vector search

created 2 years ago
2,122 stars

Top 21.6% on sourcepulse

GitHubView on GitHub
Project Summary

pgvectorscale enhances PostgreSQL's pgvector extension with Rust-based implementations for high-performance, cost-efficient vector search. It targets AI applications and developers needing to scale vector similarity search, offering significant improvements over existing solutions like Pinecone in benchmarks.

How It Works

pgvectorscale introduces a new StreamingDiskANN index type, inspired by Microsoft's DiskANN research. It also incorporates Statistical Binary Quantization (SBQ) for improved vector compression and label-based filtering for efficient, precise searches. This Rust implementation, built with the PGRX framework, allows for deeper integration and optimization within PostgreSQL.

Quick Start & Requirements

  • Installation: Pre-built Docker containers, installation from source, or via Timescale Cloud.
  • Prerequisites: PostgreSQL, Rust (for source builds), cargo-pgrx. macOS X86 (Intel) builds are not supported.
  • Setup: Docker installation is straightforward. Source builds require Rust and cargo-pgrx setup.
  • Docs: pgvectorscale Documentation

Highlighted Details

  • Achieves 28x lower p95 latency and 16x higher query throughput than Pinecone's storage-optimized index on a 50M embedding dataset.
  • Offers label-based filtering for optimized metadata searches.
  • Supports cosine, L2, and inner product distance queries.
  • Allows tuning of index build-time and query-time parameters for accuracy/performance trade-offs.

Maintenance & Community

  • Active development by Timescale.
  • Community contributions are welcomed.
  • Discord for community engagement.

Licensing & Compatibility

  • Apache 2.0 License.
  • Compatible with PostgreSQL and pgvector.

Limitations & Caveats

  • Building on macOS X86 (Intel) is not supported.
  • Indices on UNLOGGED tables are not yet implemented.
  • diskann index uses relaxed ordering; strict ordering requires a materialized CTE.
Health Check
Last commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
1
Issues (30d)
1
Star History
194 stars in the last 90 days

Explore Similar Projects

Starred by Jared Palmer Jared Palmer(Ex-VP of AI at Vercel; Founder of Turborepo; Author of Formik, TSDX).

pgvector-node by pgvector

0.8%
399
Node.js library for pgvector support
created 4 years ago
updated 2 weeks ago
Feedback? Help us improve.