pgvecto.rs
tensorchord/pgvecto.rs
Scalable, Low-latency and Hybrid-enabled Vector Search in Postgres
Overview
pgvecto.rs is a Rust-based PostgreSQL extension that provides scalable vector search capabilities with support for high-dimensional data, advanced filtering techniques, and multiple data types.
Categories
Tags
Similar tools
transformers
huggingface/transformers
🤗 Transformers: the model-definition framework for state-of-the-art machine learning models
langflow
langflow-ai/langflow
Langflow is a powerful platform for building and deploying AI-powered agents and workflows.
firecrawl
firecrawl/firecrawl
The API to search, scrape, and interact with the web at scale.
PaddleOCR
PaddlePaddle/PaddleOCR
PaddleOCR: A powerful OCR toolkit for transforming PDFs/images into structured data
graphify
Graphify-Labs/graphify
AI coding assistant skill that transforms various file types into a queryable knowledge graph
worldmonitor
koala73/worldmonitor
Real-time global intelligence dashboard.
Install
cargo add pgvecto.rsREADME
pgvecto.rs
pgvecto.rs is a Postgres extension that provides vector similarity search functions. It is written in Rust and based on pgrx.
[!NOTE] We have a new implementation VectorChord with better stability and performance. Users are encouraged to migrate to VectorChord. Check out the migration guide.
Comparison with pgvector
Checkout pgvecto.rs vs pgvector for more details.
| Feature | pgvecto.rs | pgvector |
|---|---|---|
| Filtering | Introduces VBASE method for vector search and relational query (e.g. Single-Vector TopK + Filter + Join). | When filters are applied, the results may be incomplete. For example, if you originally intended to limit the results to 10, you might end up with only 5 results with filters. |
| Vector Dimensions | Supports up to 65535 dimensions. | Supports up to 2000 dimensions. |
| SIMD | SIMD instructions are dynamically dispatched at runtime to maximize performance based on the capabilities of the specific machine. | Added CPU dispatching for distance functions on Linux x86-64" in 0.7.0. |
| Data Types | Introduces additional data types: binary vectors, FP16 (16-bit floating point), and INT8 (8-bit integer). | - |
| Indexing | Handles the storage and memory of indexes separately from PostgreSQL | Relies on the native storage engine of PostgreSQL |
| WAL Support | Provides Write-Ahead Logging (WAL) support for data, index support is working in progress. | Provides Write-Ahead Logging (WAL) support for index and data. |
Documentation
- Getting Started
- Usage
- Administration
- Developers
Quick start
For new users, we recommend using the Docker image to get started quickly.
docker run \
--name pgvecto-rs-demo \
-e POSTGRES_PASSWORD=mysecretpassword \
-p 5432:5432 \
-d ghcr.io/tensorchord/pgvecto-rs:pg17-v0.4.0
Then you can connect to the database using the psql command line tool. The default username is postgres, and the default password is mysecretpassword.
psql -h localhost -p 5432 -U postgres
Run the following SQL to ensure the extension is enabled.
DROP EXTENSION IF EXISTS vectors;
CREATE EXTENSION vectors;
pgvecto.rs introduces a new data type vector(n) denoting an n-dimensional vector. The n within the brackets signifies the dimensions of the vector.
You could create a table with the following SQL.
-- create table