X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 489D8D1B566 for ; Thu, 30 Oct 2003 15:31:57 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 77748-01 for ; Thu, 30 Oct 2003 11:31:29 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id C6541D1B51A for ; Thu, 30 Oct 2003 11:31:24 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h9UFVQit028215; Thu, 30 Oct 2003 10:31:26 -0500 (EST) To: "Cestmir Hybl" Cc: pgsql-performance@postgresql.org Subject: Re: Ignoring index on (A is null), (A is not null) conditions In-reply-to: <022001c39ed9$bfb09b20$0200a8c0@stratos> References: <017201c39d85$533eed70$0200a8c0@stratos> <022001c39ed9$bfb09b20$0200a8c0@stratos> Comments: In-reply-to "Cestmir Hybl" message dated "Thu, 30 Oct 2003 12:34:15 +0100" Date: Thu, 30 Oct 2003 10:31:26 -0500 Message-ID: <28214.1067527886@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/759 X-Sequence-Number: 4507 "Cestmir Hybl" writes: >> In fact, I need to filter by expression ((A is null) or (A > const)). I wonder whether you shouldn't reconsider your data representation. Perhaps the condition you are using "null" for would be better represented by setting A to infinity. (The float and timestamp datatypes actually have a concept of infinity; for other types you can fake it with a large positive value.) regards, tom lane