Re: full outer join performance

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

On Tue, 2005-09-13 at 13:28, Ben wrote:
> Hrm, as I understand that page, there's not much that can be done about
> the join order for outer joins. At least, not when there's on 3 tables
> and 1 outer join involved. Am I missing something?

You might be able to do some kind of thing like:

select * from (
select * from table1 <whereclausehere>) as a
) left join (
select * from table2 <whereclausehere) as b
on (a.somefield=b.somefield2)
where <anotherwhereclause)

or something.

Tom, would that help the planner make better choices for this kind of
query?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2005-09-13 19:02:46 Re: Email Verfication Regular Expression
Previous Message Peter Eisentraut 2005-09-13 19:00:29 Re: Replication