pg.ddx.io pgvector/pgvector GitHub issues and pull requests
help / color / mirror / Atom feed[pgvector/pgvector] issue #59: Question: is it possible to infer value for multiple points?
6+ messages / 3 participants
[nested] [flat]
* [pgvector/pgvector] issue #59: Question: is it possible to infer value for multiple points?
@ 2023-02-20 05:00 "JDRanpariya (@JDRanpariya)" <noreply+JDRanpariya@github.com>
0 siblings, 0 replies; 6+ messages in thread
From: JDRanpariya (@JDRanpariya) @ 2023-02-20 05:00 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
```SELECT * FROM items ORDER BY embedding <-> '[3,1,2]' LIMIT 1;```
In above case we are getting nearest neighbour for [3,1,2]. Is there a way I can provide multiple embeddings like ('[3,1,2]'), ('[9,5,4]') and get neighbours for all of them?
^ permalink raw [nested|flat] 6+ messages in thread
* Re: [pgvector/pgvector] issue #59: Question: is it possible to infer value for multiple points?
@ 2023-02-20 05:18 "ankane (@ankane)" <noreply+ankane@github.com>
4 siblings, 0 replies; 6+ messages in thread
From: ankane (@ankane) @ 2023-02-20 05:18 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Hey @JDRanpariya, you can use `UNION ALL` to combine queries in Postgres.
```sql
(SELECT 1 AS query, * FROM items ORDER BY embedding <-> '[1,2,3]' LIMIT 1)
UNION ALL
(SELECT 2 AS query, * FROM items ORDER BY embedding <-> '[4,5,6]' LIMIT 1);
```
^ permalink raw [nested|flat] 6+ messages in thread
* Re: [pgvector/pgvector] issue #59: Question: is it possible to infer value for multiple points?
@ 2023-02-20 16:41 "JDRanpariya (@JDRanpariya)" <noreply+JDRanpariya@github.com>
4 siblings, 0 replies; 6+ messages in thread
From: JDRanpariya (@JDRanpariya) @ 2023-02-20 16:41 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Thanks @ankane. Will try using that but seems like it would be big of a query if I have 1k+ vectors for inference.
^ permalink raw [nested|flat] 6+ messages in thread
* Re: [pgvector/pgvector] issue #59: Question: is it possible to infer value for multiple points?
@ 2023-02-20 18:18 "ankane (@ankane)" <noreply+ankane@github.com>
4 siblings, 0 replies; 6+ messages in thread
From: ankane (@ankane) @ 2023-02-20 18:18 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
It shouldn't be an issue for Postgres, but you could also try creating a function to see if it reduces overhead (will likely be insignificant compared to the query execution time).
^ permalink raw [nested|flat] 6+ messages in thread
* Re: [pgvector/pgvector] issue #59: Question: is it possible to infer value for multiple points?
@ 2023-02-20 18:18 "ankane (@ankane)" <noreply+ankane@github.com>
4 siblings, 0 replies; 6+ messages in thread
From: ankane (@ankane) @ 2023-02-20 18:18 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
@ankane closed this.
^ permalink raw [nested|flat] 6+ messages in thread
* Re: [pgvector/pgvector] issue #59: Question: is it possible to infer value for multiple points?
@ 2024-10-08 12:34 "SKLC1 (@SKLC1)" <noreply+SKLC1@github.com>
4 siblings, 0 replies; 6+ messages in thread
From: SKLC1 (@SKLC1) @ 2024-10-08 12:34 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
works great for a handful of vectors, cheers
^ permalink raw [nested|flat] 6+ messages in thread
end of thread, other threads:[~2024-10-08 12:34 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-02-20 05:00 [pgvector/pgvector] issue #59: Question: is it possible to infer value for multiple points? "JDRanpariya (@JDRanpariya)" <noreply+JDRanpariya@github.com>
2023-02-20 05:18 ` "ankane (@ankane)" <noreply+ankane@github.com>
2023-02-20 16:41 ` "JDRanpariya (@JDRanpariya)" <noreply+JDRanpariya@github.com>
2023-02-20 18:18 ` "ankane (@ankane)" <noreply+ankane@github.com>
2023-02-20 18:18 ` "ankane (@ankane)" <noreply+ankane@github.com>
2024-10-08 12:34 ` "SKLC1 (@SKLC1)" <noreply+SKLC1@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