Re: faster SELECT - Mailing list pgsql-general

From Chris
Subject Re: faster SELECT
Date
Msg-id 1078742421.5061.37.camel@dell
Whole thread Raw
In response to faster SELECT  (sferriol <sylvain.ferriol@imag.fr>)
Responses Re: faster SELECT
List pgsql-general
> in a 'SELECT', does postgres read the 'WHERE' condition from left to right.

PostgreSQL (SQL in general?) does NOT define evaluation order (unlike
programming languages like C).


> 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 ?

Depends on the problem.
In theory the optimizer should find the best evaluation order
after analyzing a and b.


Bye, Chris.



pgsql-general by date:

Previous
From: Vladimir Drobny
Date:
Subject: postmaster freeze
Next
From: "NTPT"
Date:
Subject: Re: faster SELECT