Andres Freund <[EMAIL PROTECTED]> writes: > SELECT * > FROM > ab LEFT OUTER JOIN ( > bc JOIN cd > ON bc.c = cd.d > ) > ON ab.b = bc.b > WHERE > ab.a = 20000
> As ab.a = 20000 occurs only once in ab one would expect that it just does an > index scan on bc for ab.b = bc.b. The only way it could do that would be by interchanging the order of the left and inner joins, ie (ab left join bc) join cd; which would change the results. I believe it could interchange the joins if they were both LEFT or both INNER. Do you really need exactly these semantics? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers