Vector similarity search inside Postgres, with ACID and JOINs

AI-generated summary of reporting by GitHub Opensource Projects. Read the original for the full story.

Why it matters

Teams with embeddings next to relational data can drop a separate vector database and its sync pipeline entirely, querying similarity with JOINs in plain SQL.

Read this as

pgvector is a free add-on, version 0.8.6, that lets the popular database Postgres store and search 'embeddings', number lists that represent the meaning of text or images so similar things sit close together. Normally companies must run a separate vector database and keep copies of data synchronized between systems. With pgvector, the embeddings live beside the ordinary data, so one query can both find similar items and filter by user or date. It suits most teams; very large deployments with billions of vectors may still need specialized systems.

pgvector trades some raw search speed for eliminating an entire vector-database service, its sync pipeline and its operational overhead. Because it runs inside Postgres, vectors inherit ACID compliance and point-in-time recovery, and similarity searches can JOIN against existing tables, removing glue code. Teams already on Postgres gain the most; shops running billions of vectors with nothing else should examine scaling and quantization before committing.

pgvector v0.8.6 is a Postgres extension (Postgres 13+) supporting exact and approximate nearest-neighbor search over vector, halfvec, binary and sparse vector types, with L2, inner product, cosine, L1, Hamming and Jaccard distance operators (<->, <#>, <=>, <+>). Inner product returns negated values because Postgres only supports ascending index scans. Quantization is the documented scaling path, and the article admits pgvector is not the fastest dedicated vector database. No benchmark numbers are given.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

pgvector Postgres GitHub Docker Postgres.app PGXN

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading