pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
[pgvector/pgvector] issue #1021: Add clustering functions to pgvector
3+ messages / 2 participants
[nested] [flat]

* [pgvector/pgvector] issue #1021: Add clustering functions to pgvector
@ 2026-09-06 05:04 "rickmark (@rickmark)" <noreply+rickmark@github.com>
  0 siblings, 0 replies; 3+ messages in thread

From: rickmark (@rickmark) @ 2026-09-06 05:04 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

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

^ permalink  raw  [nested|flat] 3+ messages in thread

* Re: [pgvector/pgvector] issue #1021: Add clustering functions to pgvector
@ 2026-09-06 14:24 ` "ankane (@ankane)" <noreply+ankane@github.com>
  1 sibling, 0 replies; 3+ messages in thread

From: ankane (@ankane) @ 2026-09-06 14:24 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Hi @rickmark, I think a public clustering API is outside the scope of pgvector, but someone could create a separate extension for it.

^ permalink  raw  [nested|flat] 3+ messages in thread

* Re: [pgvector/pgvector] issue #1021: Add clustering functions to pgvector
@ 2026-09-06 14:24 ` "ankane (@ankane)" <noreply+ankane@github.com>
  1 sibling, 0 replies; 3+ messages in thread

From: ankane (@ankane) @ 2026-09-06 14:24 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane closed this.

^ permalink  raw  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2026-09-06 14:24 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-09-06 05:04 [pgvector/pgvector] issue #1021: Add clustering functions to pgvector "rickmark (@rickmark)" <noreply+rickmark@github.com>
2026-09-06 14:24 ` "ankane (@ankane)" <noreply+ankane@github.com>
2026-09-06 14:24 ` "ankane (@ankane)" <noreply+ankane@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