Re: BUG #1252: Optimization of SELECT for NOT NULL case - Mailing list pgsql-bugs

From Bruno Wolff III
Subject Re: BUG #1252: Optimization of SELECT for NOT NULL case
Date
Msg-id 20040916173614.GA18500@wolff.to
Whole thread Raw
In response to Re: BUG #1252: Optimization of SELECT for NOT NULL case  ("Alexander Kirpa" <postgres@bilteks.com>)
List pgsql-bugs
On Wed, Sep 15, 2004 at 23:29:43 +0300,
  Alexander Kirpa <postgres@bilteks.com> wrote:
> On 15 Sep 2004, at 12:21, Bruno Wolff III wrote:
>
> Regarding your point of view possible exist reason for remove
> optimization for case like below
> SELECT count(*) from x where id>1 AND id<0
> I basically don't see any significant difference in optimization
> for "id IS NULL" and "id>1 AND id<0"

People generally know whether or not a table is NOT NULL and aren't very
likely to write queries searching for NULL values in such a table.

A general constraint handler would be useful (for example in handling
partitions of data sets), but just doing it for NOT NULL seems like it
would be a net loss.

pgsql-bugs by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Assertion failure in cvs head.
Next
From: "Steve McWilliams"
Date:
Subject: Win32: missing log file option for pg_ctl running as service