| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
| Cc: | Alexander Staubo <alex(at)purefiction(dot)net>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, Sergei Shelukhin <realgeek(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: insane index scan times |
| Date: | 2007-06-09 14:06:13 |
| Message-ID: | 15827.1181397973@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> Alexander Staubo escribi:
>> Are you sure? I was under the impression that PostgreSQL could reorder
>> "where" clauses, but did not yet reorder explicit joins (as opposed
>> to implicit ones through, say, "in"). But perhaps it only applied to
>> some types of joins.
> Postgres does flatten joins, and reorders the resulting range tables as
> convenient. Only in 8.2 it learned how to to reorder outer joins, but
> for inner joins this has been in place for a lot longer.
The rules for this have changed over time, and you can affect them through
planner parameters too. Consult
http://www.postgresql.org/docs/8.2/static/explicit-joins.html
^^^
with URL adjusted for your PG version.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Erwin Brandstetter | 2007-06-09 15:14:30 | Re: how to speed up query |
| Previous Message | Michael Fuhr | 2007-06-09 13:39:44 | Re: pg_hba.conf - md5 |