Skip site navigation (1) Skip section navigation (2)

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

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Alexander Kirpa <postgres(at)bilteks(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1252: Optimization of SELECT for NOT NULL case
Date: 2004-09-15 17:21:54
Message-ID: 20040915172154.GA28610@wolff.to (view raw or flat)
Thread:
Lists: pgsql-bugs
On Tue, Sep 14, 2004 at 00:57:07 +0100,
  PostgreSQL Bugs List <pgsql-bugs(at)postgresql(dot)org> 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;
> Optimizator should rewrite "x IS NULL" to simple "false"

Based on responses to other optimization requests I have seen, I think the
answer to this one is going to be that it isn't worth paying the cost
for every query to check for this case, since no one is going to write
a query like this except by mistake.

In response to

Responses

pgsql-bugs by date

Next:From: Jacek RembiszDate: 2004-09-15 17:49:47
Subject: Re: character and text comparison
Previous:From: Tom LaneDate: 2004-09-15 16:43:11
Subject: Re: character and text comparison

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group