pg.ddx.io  pgvector/pgvector GitHub issues and pull requests  
help / color / mirror / Atom feed
From: jkatz (@jkatz) <noreply+jkatz@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #957: The case for including `NULL`s in pgvector indexes
Date: Wed, 18 Feb 2026 23:22:21 +0000
Message-ID: <gh-pgvector-pgvector-957-c3923732689@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-957@github.com>
References: <gh-pgvector-pgvector-957@github.com>

This is the difference between exact nearest neighbor and approximate nearest neighbor. Even without considering NULLs, a sequential scan could return different results than an ANN index scan.

But the other aspect is that you can't calculate the distance between a vector and a NULL, so it wouldn't surface in the index except in the case you're posting, and a sequential scan would be faster at returning that.

view thread (5+ messages)  latest in thread

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