pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: LazyDBA247-Anyvision (@LazyDBA247-Anyvision) <noreply+LazyDBA247-Anyvision@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #1: Ideas
Date: Sat, 13 Nov 2021 20:34:36 +0000
Message-ID: <gh-pgvector-pgvector-1-c968132074@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-1@github.com>
References: <gh-pgvector-pgvector-1@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!

view thread (13+ messages)  latest in thread

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