Re: How does filter order relate to query optimization?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "David Jaquay" <djaquay(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How does filter order relate to query optimization?
Date: 2007-03-28 16:43:50
Message-ID: 3909.1175100230@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"David Jaquay" <djaquay(at)gmail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-03-28 16:48:55 Re: disable/enable trigger hangs
Previous Message David Jaquay 2007-03-28 16:39:58 Re: How does filter order relate to query optimization?