Re: Outer joins and equivalence - Mailing list pgsql-performance

From Tom Lane
Subject Re: Outer joins and equivalence
Date
Msg-id 14085.1211924592@sss.pgh.pa.us
Whole thread Raw
In response to Outer joins and equivalence  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: Outer joins and equivalence
List pgsql-performance
Simon Riggs <simon@2ndquadrant.com> writes:
> I have a complex query where making a small change to the SQL increases
> run-time by > 1000 times.

> The first SQL statement is of the form

> A JOIN B ON (a.id = b.id) LEFT JOIN C ON (a.id = c.id)

> and the second is like this

> A JOIN B ON (a.id = b.id) LEFT JOIN C ON (b.id = c.id)

> the only difference is the substitution of a -> b

Please provide an actual test case.

            regards, tom lane

pgsql-performance by date:

Previous
From: Simon Riggs
Date:
Subject: Re: I/O on select count(*)
Next
From: Matthew Wakeling
Date:
Subject: Re: Outer joins and equivalence