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] PR #424: Update cost estimation to not use index when expected tuples is too low
Date: Mon, 22 Jan 2024 02:31:36 +0000
Message-ID: <gh-pgvector-pgvector-424-c1902952289@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-424@github.com>
References: <gh-pgvector-pgvector-424@github.com>

> I'm not sure if measuring on selectivity alone will account for this. For example, a selectivity of 0.05 on a dataset of 100K has a far higher chance of not returning enough tuples vs. a dataset of 100MM.

The odds should be the same with the same `ef_search`. The index will find `ef_search` results, and only 5% of them will match.

> I wonder if another approach would be to error when there's a LIMIT/ef_search mismatch.

That'd be another option (but not sure I like it as much as the others).

view thread (15+ messages)  latest in thread

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