Re: Joining between large & small tables?

From: Scott Ribe <scott_ribe(at)elevated-dev(dot)com>
To: Wells Oliver <wells(dot)oliver(at)gmail(dot)com>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Joining between large & small tables?
Date: 2020-07-14 01:42:59
Message-ID: 258F84EA-9EF3-43C0-B3FC-82E9154EDE54@elevated-dev.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> On Jul 13, 2020, at 7:39 PM, Wells Oliver <wells(dot)oliver(at)gmail(dot)com> wrote:
>
> Given a large large large table A and a small small temp table B is there any benefit to doing SELECT * FROM a JOIN b USING (somecol) vs SELECT * FROM b JOIN a USING (somecol)?
>
> When you just want the intersection...

No, planner will figure out how to join based on stats, not order. (With default planner options; there are ways to work around that in the rare case that the planner can't figure out the best way.)

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message David G. Johnston 2020-07-14 01:44:23 Re: Joining between large & small tables?
Previous Message Wells Oliver 2020-07-14 01:39:39 Joining between large & small tables?