Skip site navigation (1) Skip section navigation (2)

Re: Outer joins and equivalence

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Outer joins and equivalence
Date: 2008-05-27 21:43:12
Message-ID: 14085.1211924592@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-performance
Simon Riggs <simon(at)2ndquadrant(dot)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

In response to

Responses

pgsql-performance by date

Next:From: Matthew WakelingDate: 2008-05-28 10:45:14
Subject: Re: Outer joins and equivalence
Previous:From: Simon RiggsDate: 2008-05-27 20:54:26
Subject: Re: I/O on select count(*)

pgsql-hackers by date

Next:From: Tom LaneDate: 2008-05-27 22:02:48
Subject: Re: ERRORDATA_STACK_SIZE panic crashes on Windows
Previous:From: Tom LaneDate: 2008-05-27 21:36:39
Subject: Re: BUG #4204: COPY to table with FK has memory leak

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group