pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: frapercan (@frapercan) <noreply+frapercan@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] PR #809: docs: Add FAQ about pgvector feasibility for bulk distance calculations
Date: Wed, 26 Mar 2025 23:56:00 +0000
Message-ID: <gh-pgvector-pgvector-809@github.com> (raw)

This PR adds a frequently asked question and answer detailing why row-oriented databases such as Postgres (with pgvector) may not be optimal for massive distance computations.

inline patch 1: README.md (+4/-0 lines) download inline-1.patchdiff --git a/README.md b/README.md index 1ee996b94..af817528d 100644 --- a/README.md +++ b/README.md @@ -881,6 +881,10 @@ No, but like other index types, you’ll likely see better performance if they d SELECT pg_size_pretty(pg_relation_size('index_name')); ``` +#### Is it feasible to use pgvector for bulk distance calculations? + +row-oriented databases like Postgres aren’t optimized for massive distance computations. For large-scale vector operations (e.g., millions of vectors), it’s recommended to use specialized libraries that store vectors in contiguous memory and support matrix operations, as this delivers much higher performance than repeatedly calculating distances within SQL. + ## Troubleshooting #### Why isn’t a query using an index?

view thread (4+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-809@github.com>
Permalink:  ../gh-pgvector-pgvector-809@github.com/

 ·  · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox