Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine. [ with better indenting ] - Mailing list pgsql-performance

From Tom Lane
Subject Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine. [ with better indenting ]
Date
Msg-id 28551.1067530272@sss.pgh.pa.us
Whole thread Raw
In response to Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine. [ with better indenting ]  (Rajesh Kumar Mallah <mallah@trade-india.com>)
Responses Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine.
List pgsql-performance
Rajesh Kumar Mallah <mallah@trade-india.com> writes:
> SELECT DISTINCT main.* FROM
> (
>    (
>       (
>          (
>             Tickets main  JOIN Groups as Groups_1  ON ( main.id = Groups_1.Instance)
>          )  JOIN
>          Principals as Principals_2  ON ( Groups_1.id = Principals_2.ObjectId)
>       ) JOIN
>       CachedGroupMembers as CachedGroupMembers_3  ON ( Principals_2.id = CachedGroupMembers_3.GroupId)
>    )  JOIN
>    Users as Users_4  ON ( CachedGroupMembers_3.MemberId = Users_4.id)
> )   WHERE
>  ...

I think the reason for the performance difference is that 7.3 treats
JOIN syntax as forcing a particular join order, while 7.4 doesn't.

            regards, tom lane

pgsql-performance by date:

Previous
From: Rajesh Kumar Mallah
Date:
Subject: Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine.
Next
From: Rajesh Kumar Mallah
Date:
Subject: Re: Query puts 7.3.4 on endless loop but 7.4beta5 is fine.