"Roderick A. Anderson" <raanders@altoplanos.net> writes:
> Also if the optimizer works similar to Oracle then the order of
> where statements would also help in actual performance. I'm mostly a
> lurker on this list but have never seen anything about this issue.
> When using Oracle, and won't it be nice when people mention PostgreSQL
> functionality when comparing other databases, the statements at the
> bottom should be the most restrictive and joins should be near the top.
The Postgres optimizer doesn't care about the order of where clauses;
it'll pick out the clauses it thinks are most effective regardless
of the order you write them in.
regards, tom lane