Re: join order

From: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
To: AI Rumman <rummandba(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: join order
Date: 2010-10-11 06:46:50
Message-ID: AANLkTi=DbetG_BPmtua10hBETtvLcdk+aOCdnFxfvSCy@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Mon, Oct 11, 2010 at 12:38 AM, AI Rumman <rummandba(at)gmail(dot)com> wrote:
> I need to join two tales say TAB_A and TAB_B, where TAB_A is greater than
> TAB_B in size and records.
> Which Table should I put first in join order?

If it's a regular old inner join it doesn't matter, the query planner
will figure it out. If it's a left or right join then you
(hopefullly) already know the order you need to use. If it's a full
outer join again it doesn't matter, the query planner will figure it
out.

--
To understand recursion, one must first understand recursion.

In response to

  • join order at 2010-10-11 06:38:45 from AI Rumman

Browse pgsql-performance by date

  From Date Subject
Next Message Pierre C 2010-10-11 10:09:02 Re: Slow count(*) again...
Previous Message AI Rumman 2010-10-11 06:38:45 join order