Re: BUG #6426: Complex query runs 10 times longer with "LIMIT 20" - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #6426: Complex query runs 10 times longer with "LIMIT 20"
Date
Msg-id 25499.1328200832@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #6426: Complex query runs 10 times longer with "LIMIT 20"  (Andrew Schetinin <aschetinin@gmail.com>)
List pgsql-bugs
Andrew Schetinin <aschetinin@gmail.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

pgsql-bugs by date:

Previous
From: "Bousche, Olaf"
Date:
Subject: Re: BUG #6424: Possible error in time to seconds conversion
Next
From: Tom Lane
Date:
Subject: Re: BUG #6407: Crash on queries to gin index with multiply values