From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Allan Engelhardt <allane(at)cybaea(dot)com> |
Cc: | Mihai Gheorghiu <tanethq(at)earthlink(dot)net>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: What is faster? |
Date: | 2001-09-17 23:25:03 |
Message-ID: | 20010918092503.B25112@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, Sep 17, 2001 at 10:05:32PM +0100, Allan Engelhardt wrote:
> Mihai Gheorghiu wrote:
>
> > What runs faster?
> > select where timestamp IS NOT NULL
> > or
> > select where boolean IS TRUE?
>
> It depends..... (You knew somebody would say that, didn't you? :-))
>
> If you return a lot of data, then the statement that returns the least
> data is likely to be the fastest.
Except for the fact that IS NOT NULL cannot use an index whereas IS TRUE can
(I beleive, = 't' definitly can).
--
Martijn van Oosterhout <kleptog(at)svana(dot)org>
http://svana.org/kleptog/
> Magnetism, electricity and motion are like a three-for-two special offer:
> if you have two of them, the third one comes free.
From | Date | Subject | |
---|---|---|---|
Next Message | Cosmos Tong | 2001-09-17 23:48:11 | Re: Error in compiling PHP with PostgreSQL support |
Previous Message | Serguei Mokhov | 2001-09-17 23:24:54 | [OT] Re: MySQL development MUST immdediately cease - Due to GlobalEconomic condition.. |