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; > 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. ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])