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 #902: Optimizing distance + date queries
Date: Mon, 29 Sep 2025 20:25:02 +0000
Message-ID: <gh-pgvector-pgvector-902-c3348920877@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-902@github.com>
References: <gh-pgvector-pgvector-902@github.com>

It looks like very few rows match the distance filter (it scanned 36758 rows to find 1 matching). If this is typical, you'll likely see better performance by partitioning the table by `published_at`, adding an HNSW index, and updating the query to use it.

You'll likely also see better performance by adding more RAM (as buffers `read` indicates the query needed to read from disk).

Finally, please use `psql` in the future to make the EXPLAIN output more readable and ensure the table definition is accurate.

view thread (7+ messages)  latest in thread

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