pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
[pgvector/pgvector] issue #1: Ideas
13+ messages / 7 participants
[nested] [flat]

* [pgvector/pgvector] issue #1: Ideas
@ 2021-04-20 22:07 "ankane (@ankane)" <noreply+ankane@github.com>
  0 siblings, 0 replies; 13+ messages in thread

From: ankane (@ankane) @ 2021-04-20 22:07 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Plan

- [ ] Use pairing heap for index scan for performance - `stages` branch
- [ ] Use mini-batch k-means for index creation for reduced memory - `minibatch` branch
- [ ] Add support for product quantization (in-progress)

Ideas

- [ ] Use `tuplesort_set_bound` for performance - `bound` branch (not needed w/ pairing heap)
- [ ] Add functions to view lists and/or pages like [pageinspect](https://www.postgresql.org/docs/current/pageinspect.html) (require superuser)

On-hold

- [ ] Add support for parallel index scans (planner gets cost estimate but doesn't use) - `parallel-index-scan` branch
- [ ] Change return type of distance functions from float8 to float4 for performance (maybe, needs benchmarking)

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

* Re: [pgvector/pgvector] issue #1: Ideas
@ 2021-05-02 22:11 ` "yjhjstz (@yjhjstz)" <noreply+yjhjstz@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: yjhjstz (@yjhjstz) @ 2021-05-02 22:11 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

look forward parallel index scans.

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

* Re: [pgvector/pgvector] issue #1: Ideas
@ 2021-05-25 11:45 ` "lensky84 (@lensky84)" <noreply+lensky84@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: lensky84 (@lensky84) @ 2021-05-25 11:45 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Hello!

Is it possible to have more than 1024 dimensions? 2048 for example?

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

* Re: [pgvector/pgvector] issue #1: Ideas
@ 2021-05-26 02:03 ` "ankane (@ankane)" <noreply+ankane@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: ankane (@ankane) @ 2021-05-26 02:03 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

There aren't any plans to support more dimensions, but you could fork the project and try it.

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

* Re: [pgvector/pgvector] issue #1: Ideas
@ 2021-06-04 02:37 ` "yjhjstz (@yjhjstz)" <noreply+yjhjstz@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: yjhjstz (@yjhjstz) @ 2021-06-04 02:37 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

the simple way is "./configure --with-blocksize=32" ,  so that has bigger page block . @ankane @lensky84 

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

* Re: [pgvector/pgvector] issue #1: Ideas
@ 2021-10-14 18:55 ` "calebj (@calebj)" <noreply+calebj@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: calebj (@calebj) @ 2021-10-14 18:55 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

I'd like to propose support for aggregation of vectors, which would allow something like
```sql
SELECT label, count(sublabel), vector_norm(sum(embedding)) FROM sometable GROUP BY label;
```
or other advanced scenarios that use a window to perform a running vector average, or weighting each summed vector based on another column (which would also need element-wise multiplication defined).

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

* Re: [pgvector/pgvector] issue #1: Ideas
@ 2021-10-14 19:04 ` "mikeizbicki (@mikeizbicki)" <noreply+mikeizbicki@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: mikeizbicki (@mikeizbicki) @ 2021-10-14 19:04 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@calebj This feature is currently implemented in the open pull request #13.

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

* Re: [pgvector/pgvector] issue #1: Ideas
@ 2021-10-14 20:57 ` "calebj (@calebj)" <noreply+calebj@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: calebj (@calebj) @ 2021-10-14 20:57 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

> @calebj This feature is currently implemented in the open pull request #13.

Oh, sweet. Somehow I overlooked that. I'll see if it fits our use case and report any issues I encounter in that thread 👍🏼 

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

* Re: [pgvector/pgvector] issue #1: Ideas
@ 2021-11-13 20:34 ` "LazyDBA247-Anyvision (@LazyDBA247-Anyvision)" <noreply+LazyDBA247-Anyvision@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: LazyDBA247-Anyvision (@LazyDBA247-Anyvision) @ 2021-11-13 20:34 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane First of all amazing project, Thank You!

1. did you ever think of adding support for GPU index (FAISS, flat index which supports all operations(add/remove/update)), so it will be possible to "enable" when you compiled faiss + have a nvidia card.
something like https://milvus.io/ but much easier as this is already backed into our database :)

2. any optimizations on running batch queries (when you send 2+ vectors) and get for each it topK.
today you need to join the vector and use some row_number function to get the topK for each vector.
example (get topK 10, for 10 items on 1 scan of the table):
```
select "itemId","vectorId", score from (
				select "itemId","vectorId", score, row_number() over (partition by "subjectId" order by score desc) as rown
				from (	
					select "itemId","vectorsToCheck"."vectorId",inner_product(a.features, "vectorsToCheck".features)::float4 as score
					from "itemFeatures" a, (select * from query_data limit 10) "vectorsToCheck"
					) c 
				) d
where rown <= 10
```

10x!

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

* Re: [pgvector/pgvector] issue #1: Ideas
@ 2021-11-16 03:26 ` "ankane (@ankane)" <noreply+ankane@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: ankane (@ankane) @ 2021-11-16 03:26 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Hi @LazyDBA247-Anyvision, there aren't any plans to add GPU support, but would be neat if someone in the community wanted to prototype it.

For batch queries, there aren't currently any optimizations, and I'm not entirely sure it's possible with how Postgres queries are executed (but someone with deeper knowledge may know better).

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

* Re: [pgvector/pgvector] issue #1: Ideas
@ 2022-05-25 19:11 ` "ankane (@ankane)" <noreply+ankane@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: ankane (@ankane) @ 2022-05-25 19:11 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

Moved to #27

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

* Re: [pgvector/pgvector] issue #1: Ideas
@ 2022-05-25 19:11 ` "ankane (@ankane)" <noreply+ankane@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: ankane (@ankane) @ 2022-05-25 19:11 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane closed this.

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

* Re: [pgvector/pgvector] issue #1: Ideas
@ 2026-02-23 20:27 ` "Leonardo-Ferreira (@Leonardo-Ferreira)" <noreply+Leonardo-Ferreira@github.com>
  11 siblings, 0 replies; 13+ messages in thread

From: Leonardo-Ferreira (@Leonardo-Ferreira) @ 2026-02-23 20:27 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

>Hi @LazyDBA247-Anyvision, there aren't any plans to add GPU support, but would be neat if someone in the community wanted to prototype it.
For batch queries, there aren't currently any optimizations, and I'm not entirely sure it's possible with how Postgres queries are executed (but someone with deeper knowledge may know better).

@ankane is this still the current position of the project leadership?

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


end of thread, other threads:[~2026-02-23 20:27 UTC | newest]

Thread overview: 13+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 22:07 [pgvector/pgvector] issue #1: Ideas "ankane (@ankane)" <noreply+ankane@github.com>
2021-05-02 22:11 ` "yjhjstz (@yjhjstz)" <noreply+yjhjstz@github.com>
2021-05-25 11:45 ` "lensky84 (@lensky84)" <noreply+lensky84@github.com>
2021-05-26 02:03 ` "ankane (@ankane)" <noreply+ankane@github.com>
2021-06-04 02:37 ` "yjhjstz (@yjhjstz)" <noreply+yjhjstz@github.com>
2021-10-14 18:55 ` "calebj (@calebj)" <noreply+calebj@github.com>
2021-10-14 19:04 ` "mikeizbicki (@mikeizbicki)" <noreply+mikeizbicki@github.com>
2021-10-14 20:57 ` "calebj (@calebj)" <noreply+calebj@github.com>
2021-11-13 20:34 ` "LazyDBA247-Anyvision (@LazyDBA247-Anyvision)" <noreply+LazyDBA247-Anyvision@github.com>
2021-11-16 03:26 ` "ankane (@ankane)" <noreply+ankane@github.com>
2022-05-25 19:11 ` "ankane (@ankane)" <noreply+ankane@github.com>
2022-05-25 19:11 ` "ankane (@ankane)" <noreply+ankane@github.com>
2026-02-23 20:27 ` "Leonardo-Ferreira (@Leonardo-Ferreira)" <noreply+Leonardo-Ferreira@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