Re: Query plan for "id IS NULL" on PK - Mailing list pgsql-general

From David G. Johnston
Subject Re: Query plan for "id IS NULL" on PK
Date
Msg-id CAKFQuwb3mMRL-bAsMSo3ks78_4cYCV5qptxHPs7mSoKPz1w5Pg@mail.gmail.com
Whole thread Raw
In response to Re: Query plan for "id IS NULL" on PK  (Rob Sargent <robjsargent@gmail.com>)
Responses Re: Query plan for "id IS NULL" on PK  (Rob Sargent <robjsargent@gmail.com>)
List pgsql-general
On Tue, Feb 14, 2023 at 3:25 PM Rob Sargent <robjsargent@gmail.com> wrote:

When will id be null in a primary key?


The OP seems to be aware of this...

"We cannot change the query being executed. Is there any way we can make the query planner ignore `OR (id IS NULL)` (as that will never be the case for the PK) and use both `id` clauses in the index condition?"

David J.

pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: Query plan for "id IS NULL" on PK
Next
From: Rob Sargent
Date:
Subject: Re: Query plan for "id IS NULL" on PK