Re: full outer join performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Scott Marlowe <smarlowe(at)g2switchworks(dot)com>
Cc: Ben <bench(at)silentmedia(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: full outer join performance
Date: 2005-09-13 19:08:58
Message-ID: 26054.1126638538@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Marlowe <smarlowe(at)g2switchworks(dot)com> writes:
> Tom, would that help the planner make better choices for this kind of
> query?

I think the problem was that he had

select ... from a, b full join c on ... where ...

where table b is big and you only need a few rows from it, so it really
needs to be joined last, but the above forced doing it first. It wasn't
clear to me why he wanted the full join at all (in fact, you could see
from the plan that the planner had been able to reduce it to a left join
because there were WHERE clauses that'd discard one set of null-extended
rows anyway). Without knowing that, it's hard to say whether there's
another way to get what he wants.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ben 2005-09-13 19:15:21 oracle's first_value function for postgres?
Previous Message Karsten Hilbert 2005-09-13 19:07:14 GNUmed release 0.1 announcement