Richard Huxton <dev@archonet.com> writes:
> George Woodring wrote:
>>      FROM
>>          settop_billing
>>      LEFT OUTER JOIN
>>          (dhct JOIN dhct_davic USING(mac))
>>      USING
>>          (mac)
>>      WHERE
>>          region='GTown1E' AND node='1E012'

> With 7.4 I seem to remember that explicit JOINs force the evaluation 
> order, but I'm not if even later versions will rewrite your query. It's 
> too early in the morning for me to figure out if it's safe in all cases.

CVS HEAD can re-order left joins in common cases, but no existing
release will touch the ordering of outer joins at all.

It's impossible to tell here which tables the WHERE-clause restrictions
actually bear on, so there's no way to say whether a different join
order would help.  My guess though is that George may be stuck --- in
general you can't move a join into or out of the right side of a left
join without changing the answers.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to