Re: [BUGS] BUG #1252: Optimization of SELECT for NOT NULL case

2004-09-16 Thread Bruno Wolff III
On Wed, Sep 15, 2004 at 23:29:43 +0300, Alexander Kirpa <[EMAIL PROTECTED]> 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 do

Re: [BUGS] BUG #1252: Optimization of SELECT for NOT NULL case

2004-09-15 Thread Alexander Kirpa
On 15 Sep 2004, at 12:21, Bruno Wolff III wrote: > On Tue, Sep 14, 2004 at 00:57:07 +0100, > PostgreSQL Bugs List <[EMAIL PROTECTED]> wrote: > > > > Description:Optimization of SELECT for NOT NULL case > > > > Details: > > > > CREATE TABLE x (id int4 NOT NULL); > > Populate table, fo

Re: [BUGS] BUG #1252: Optimization of SELECT for NOT NULL case

2004-09-15 Thread Tom Lane
Bruno Wolff III <[EMAIL PROTECTED]> writes: > On Tue, Sep 14, 2004 at 00:57:07 +0100, >> CREATE TABLE x (id int4 NOT NULL); >> SELECT count(*) from x WHERE x IS NULL; >> Optimizator should rewrite "x IS NULL" to simple "false" > Based on responses to other optimization requests I have seen, I thin

Re: [BUGS] BUG #1252: Optimization of SELECT for NOT NULL case

2004-09-15 Thread Bruno Wolff III
On Tue, Sep 14, 2004 at 00:57:07 +0100, PostgreSQL Bugs List <[EMAIL PROTECTED]> wrote: > > Description:Optimization of SELECT for NOT NULL case > > Details: > > CREATE TABLE x (id int4 NOT NULL); > Populate table, for instance, 10M rows; > SELECT count(*) from x WHERE x IS NULL; > Op

[BUGS] BUG #1252: Optimization of SELECT for NOT NULL case

2004-09-13 Thread PostgreSQL Bugs List
The following bug has been logged online: Bug reference: 1252 Logged by: Alexander Kirpa Email address: [EMAIL PROTECTED] PostgreSQL version: 8.0 Beta Operating system: FreeBSD 5.2.1 Description:Optimization of SELECT for NOT NULL case Details: CREATE TABLE x (