pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: VladlenPopolitov (@VladlenPopolitov) <noreply+VladlenPopolitov@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #761: Enhancement: multicolumn vector index design
Date: Tue, 11 Mar 2025 06:18:51 +0000
Message-ID: <gh-pgvector-pgvector-761-c2712800382@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-761@github.com>
References: <gh-pgvector-pgvector-761@github.com>

@ankane I am sorry, I was busy with other project. ACORN is the good source of idea. I would share my consideration about algorithms like ACORN and used by vector databases. 
Vector databases create own internal indexes to be ready to any possible query of the client. A field can contain a number, but client can consider it as range from minimum to maximum (use operator = or < or >) or as value of the set (operator IN or <@ - ACORN looks good for this case of queries). Vector database processes come of the operators faster, some slower depending on algorithm implemented.

Postgres has other setup. When you have data and need search them, you have to choose the best type of index of your data. It can be btree, gist, gin - every index defined on specific types and operators. If you look for integers with low selectivity - use btree. If look for value contained in array, use gin, etc.

https://github.com/pgvector/pgvector/issues/259#issuecomment-1721382806 looks good for `field = value` operation - should be very fast. It will work reasonably good for `field < value`, if predicate selectivity is low.

I would propose to do not overcomplicate by building 2 types of links to make development faster, but 2 types of link also working solution (2 indexes in 1 index file).
   

view thread (18+ messages)  latest in thread

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