pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: ankane (@ankane) <noreply+ankane@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #734: How to bypass approximate index for certain query?
Date: Fri, 13 Dec 2024 15:08:07 +0000
Message-ID: <gh-pgvector-pgvector-734-c2541660769@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-734@github.com>
References: <gh-pgvector-pgvector-734@github.com>

Hi @mitya12342, you can change the `ORDER BY` clause to an expression that isn't indexed, like:

```sql
ORDER BY (embedding <=> $1) + 0
```

Alternatively, for IVFFlat, you can set `ivfflat.probes` to the number of lists.

view thread (3+ messages)  latest in thread

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