Re: Reduce planning time for large NOT IN lists containing NULL

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: Ilia Evdokimov <ilya.evdokimov@tantorlabs.com>
Cc: Zsolt Parragi <zsolt.parragi@percona.com>, David Geier <geidav.pg@gmail.com>, PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2026-03-18T04:32:47Z
Lists: pgsql-hackers

Attachments

On Tue, 17 Mar 2026 at 23:51, Ilia Evdokimov
<ilya.evdokimov@tantorlabs.com> wrote:
> Rebased the v7-patches to fix git apply failure.

Thanks. I've pushed 0001.

I ended up renaming the new file to planner_est.sql as the function
handles width estimate masking too, so I thought just calling it
selectivity_est was a bit too restrictive. I went with planner_est.
That means 0002 needed rebased. I've done that in the attached. Will
look more closely at that one later.

David

Commits

  1. Short-circuit row estimation in NOT IN containing NULL consts

  2. Move planner row-estimation tests to new planner_est.sql