Andrew Schetinin <aschetinin(at)gmail(dot)com> writes:
> Previously I always thought that the order of JOINs or conditions in WHERE
> is irrelevant, and query optimizer rearranges the order according to its
> logic. Now it appears that sometimes it may be important.
If you have more than join_collapse_limit JOINs in the query, the order
can matter.
regards, tom lane