Re: Query plan for "id IS NULL" on PK

From: Rob Sargent <robjsargent(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Query plan for "id IS NULL" on PK
Date: 2023-02-14 22:44:17
Message-ID: 90521e4c-fcb6-f031-37a2-daaa32fee598@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2/14/23 15:43, Peter J. Holzer wrote:
> On 2023-02-14 15:36:32 -0700, Rob Sargent wrote:
>> But if the query is supposed to be generic and re-used in a situation where id
>> could be null, wouldn't the null id records be fetched every time?
> No, they will never be fetched because of the AND (("id" <= ?)).
>
> hp
>
Yeah, wanted that back as I hit send.  Sorry.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Brad White 2023-02-14 22:58:48 Re: Quoting issue from ODBC
Previous Message Peter J. Holzer 2023-02-14 22:43:04 Re: Query plan for "id IS NULL" on PK