From: Tom Lane <tgl@sss.pgh.pa.us>
To: Cestmir Hybl <cestmirl@freeside.sk>
Cc: pgsql-performance@postgresql.org
Subject: Re: Ignoring index on (A is null), (A is not null) conditions
Date: Thu, 30 Oct 2003 10:31:26 -0500
Message-ID: <28214.1067527886@sss.pgh.pa.us> (raw)
In-Reply-To: <022001c39ed9$bfb09b20$0200a8c0@stratos>
References: <017201c39d85$533eed70$0200a8c0@stratos>
<022001c39ed9$bfb09b20$0200a8c0@stratos>
"Cestmir Hybl" <cestmirl@freeside.sk> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, cestmirl@freeside.sk
Subject: Re: Ignoring index on (A is null), (A is not null) conditions
In-Reply-To: <28214.1067527886@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox