Re: [SQL] Good Optimization - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] Good Optimization
Date
Msg-id 26222.931362298@sss.pgh.pa.us
Whole thread Raw
In response to Re: [SQL] Good Optimization  ("Roderick A. Anderson" <raanders@altoplanos.net>)
Responses Re: [SQL] Good Optimization  ("Roderick A. Anderson" <raanders@altoplanos.net>)
List pgsql-sql
"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


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: [SQL] Good Optimization
Next
From: "Roderick A. Anderson"
Date:
Subject: Re: [SQL] Good Optimization