From: kinghuang (@kinghuang) <noreply+kinghuang@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #687: Query returns indexed rows with noticeable "steps"; how to control?
Date: Tue, 01 Oct 2024 00:50:50 +0000
Message-ID: <gh-pgvector-pgvector-687-c2384567953@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-687@github.com>
References: <gh-pgvector-pgvector-687@github.com>
This is with `hnsw.ef_search = 200`.
```sql
select
e.doc_id,
e.ext_id,
e.source_id,
e.reference_datetime,
cs.dist as cs_dist
from dlph_doc__embedding_4 e
cross join lateral (
select embedding <=> dlph__ml.vertexai_embedding('example')::vector(768) dist
) cs
order by cs.dist;
```
```
Index Scan using dlph_doc__embedding_4_embedding_idx on dlph_doc__embedding_4 e (cost=27.01..11700.84 rows=38162 width=36) (actual time=152.395..12480.575 rows=207 loops=1)
Order By: (embedding <=> (dlph__ml.vertexai_embedding('example'::text, 'text-embedding-004'::text))::vector(768))
Planning Time: 0.129 ms
Execution Time: 12480.767 ms
```