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 #784: HNSW Index Cost Computation
Date: Mon, 24 Feb 2025 07:44:56 +0000
Message-ID: <gh-pgvector-pgvector-784-c2677642423@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-784@github.com>
References: <gh-pgvector-pgvector-784@github.com>

Hi @Masrt200,

The difference is likely due to the [storage strategy](https://www.postgresql.org/docs/current/storage-toast.html). Vectors with 768 are stored out-of-line by default, so only ones that match the `WHERE` condition need to be loaded. Vectors with 128 dimensions are stored inline by default, so it's more expensive to scan the table.

Re `iterative_scan`: The planner expects all scans to be iterative, so this is already taken into account (see #686).

A few questions:

1. What version of pgvector are you on?
2. What's the output of `EXPLAIN (ANALYZE, BUFFERS, SETTINGS)` for the queries with `SET enable_seqscan = off;`?
3. What's the output of `EXPLAIN (ANALYZE, BUFFERS, SETTINGS)` for the queries with `SET enable_indexscan = off;`?

view thread (3+ messages)  latest in thread

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