pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
[pgvector/pgvector] issue #734: How to bypass approximate index for certain query? 
3+ messages / 2 participants
[nested] [flat]

* [pgvector/pgvector] issue #734: How to bypass approximate index for certain query? 
@ 2024-12-13 03:51  "mitya12342 (@mitya12342)" <noreply+mitya12342@github.com>
  0 siblings, 0 replies; 3+ messages in thread

From: mitya12342 (@mitya12342) @ 2024-12-13 03:51 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

A bit of opposite thing of what everyone asked about. What is the correct way to control whether results are always exact, or approximate index might be used? How to disable only pgvector's indexes per query?

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

* Re: [pgvector/pgvector] issue #734: How to bypass approximate index for certain query? 
@ 2024-12-13 15:08  "ankane (@ankane)" <noreply+ankane@github.com>
  1 sibling, 0 replies; 3+ messages in thread

From: ankane (@ankane) @ 2024-12-13 15:08 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@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.

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

* Re: [pgvector/pgvector] issue #734: How to bypass approximate index for certain query? 
@ 2024-12-13 15:08  "ankane (@ankane)" <noreply+ankane@github.com>
  1 sibling, 0 replies; 3+ messages in thread

From: ankane (@ankane) @ 2024-12-13 15:08 UTC (permalink / raw)
  To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>

@ankane closed this.

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


end of thread, other threads:[~2024-12-13 15:08 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-12-13 03:51 [pgvector/pgvector] issue #734: How to bypass approximate index for certain query?  "mitya12342 (@mitya12342)" <noreply+mitya12342@github.com>
2024-12-13 15:08 ` "ankane (@ankane)" <noreply+ankane@github.com>
2024-12-13 15:08 ` "ankane (@ankane)" <noreply+ankane@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