Re: faster SELECT

From: Chris <list(at)1006(dot)org>
To: sferriol <sylvain(dot)ferriol(at)imag(dot)fr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: faster SELECT
Date: 2004-03-08 10:40:21
Message-ID: 1078742421.5061.37.camel@dell
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message NTPT 2004-03-08 10:49:21 Re: faster SELECT
Previous Message Vladimir Drobny 2004-03-08 10:39:56 postmaster freeze