Re: faster SELECT

From: Richard Huxton <dev(at)archonet(dot)com>
To: sferriol <sylvain(dot)ferriol(at)imag(dot)fr>, pgsql-general(at)postgresql(dot)org
Subject: Re: faster SELECT
Date: 2004-03-08 10:27:15
Message-ID: 200403081027.15868.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday 08 March 2004 09:41, sferriol wrote:
> hello
> in a 'SELECT', does postgres read the 'WHERE' condition from left to right.
>
> for example
> 1) select ... where a and b;
> 2) select ... where b and a;
>
> 1 and 2 will use the same cpu time or not ?

I really wouldn't worry about it, for two reasons.
1. The difference in timing is going to be negligible (probably not
measurable).
2. The developers might change their mind about evaluation order, in which
case you've wasted your time optimising.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Vladimir Drobny 2004-03-08 10:39:56 postmaster freeze
Previous Message Dexter Tad-y 2004-03-08 10:24:58 Re: faster SELECT