pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: rickmark (@rickmark) <noreply+rickmark@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: [pgvector/pgvector] issue #1021: Add clustering functions to pgvector
Date: Sun, 06 Sep 2026 05:04:36 +0000
Message-ID: <gh-pgvector-pgvector-1021@github.com> (raw)

It seems to me that this is a complete and (imho) awesome implementation of vectors and related search, but due to the amount of network traffic, becomes a bottleneck to doing clustering over a network (ddi this in a photo face matching library via cluster kit gem).

I _KNOW_ that there can be a tendency to say "don't to too much in the database" but there's also a point to data locality... because each Postgres process is a separate pid, and because there's concepts around read-only slaves, I think we need to bring various clustering algorithms closer to the data


Top examples from GenAI
* K-Means: The standard choice for vector quantization and inverted file indexing (IVF) in vector databases, which groups vectors by minimizing squared Euclidean distances to cluster centroids. You can implement standard workflows using [scikit-learn clustering modules](https://scikit-learn.org/stable/modules/clustering.html) or optimized routines via [SciPy Vector Quantization](https://docs.scipy.org/doc/scipy/reference/cluster.vq.html)
* DBSCAN: A density-based approach ideal when the number of clusters is unknown or when you need to find arbitrary shapes and isolate outliers in high-dimensional spaces
* Hierarchical / Balanced Clustering: Used in advanced indexing like SPANN to maintain uniform cluster sizes and lower latency variance during searches
* Spectral Clustering: Projects vectors or graph Laplacian eigenvectors into a lower-dimensional space before running standard partitioning

view thread (3+ messages)  latest in thread

Message-ID: <gh-pgvector-pgvector-1021@github.com>
Permalink:  ../gh-pgvector-pgvector-1021@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