Re: How does filter order relate to query optimization? - Mailing list pgsql-general

From Tom Lane
Subject Re: How does filter order relate to query optimization?
Date
Msg-id 3909.1175100230@sss.pgh.pa.us
Whole thread Raw
In response to Re: How does filter order relate to query optimization?  ("David Jaquay" <djaquay@gmail.com>)
List pgsql-general
"David Jaquay" <djaquay@gmail.com> writes:
> How exactly can you control the join order?

http://www.postgresql.org/docs/8.2/static/explicit-joins.html

(adjust link for your PG version, as this material changes from release
to release)

> I have cases where the
> explain data indicates that the planner is picking a very inefficient
> way to get the data, (i.e. joining two very big tables in their
> entirety, then joining that to a 3rd with maybe 10 rows yielding maybe
> 30).

Could you show us some specific examples?  I'm usually more interested
in fixing the planner than overriding it.

            regards, tom lane

pgsql-general by date:

Previous
From: "David Jaquay"
Date:
Subject: Re: How does filter order relate to query optimization?
Next
From: Tom Lane
Date:
Subject: Re: disable/enable trigger hangs