Re: Index Scan taking long time - Mailing list pgsql-performance

From Tom Lane
Subject Re: Index Scan taking long time
Date
Msg-id 25686.1245248600@sss.pgh.pa.us
Whole thread Raw
In response to Re: Index Scan taking long time  (Scott Marlowe <scott.marlowe@gmail.com>)
Responses Re: Index Scan taking long time
List pgsql-performance
Scott Marlowe <scott.marlowe@gmail.com> writes:
> Without looking at the explain just yet, it seems to me that you are
> constraining the order of joins to insist that the left joins be done
> first, then the regular joins second, because of your mix of explicit
> and implicit join syntax.  The query planner is constrained to run
> explicit joins first, then implicit if I remember correctly.

That isn't true as of recent releases (8.2 and up, I think).  It is true
that there are semantic constraints that prevent certain combinations
of inner and outer joins from being rearranged ... but if that applies
here, it would also prevent manual rearrangement, unless the OP decides
that this query doesn't express quite what he meant.

            regards, tom lane

pgsql-performance by date:

Previous
From: Merlin Moncure
Date:
Subject: Re: Speeding up a query.
Next
From: "Kevin Grittner"
Date:
Subject: Re: performance with query