From: Scott Ribe <scott_ribe@elevated-dev.com>
To: Wells Oliver <wells.oliver@gmail.com>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: Joining between large & small tables?
Date: Mon, 13 Jul 2020 19:42:59 -0600
Message-ID: <258F84EA-9EF3-43C0-B3FC-82E9154EDE54@elevated-dev.com> (raw)
In-Reply-To: <CAOC+FBUnp60kdRhQFe9JokapXT-qN=L6Zg_0Nv0fk35vi7_YbA@mail.gmail.com>
References: <CAOC+FBUnp60kdRhQFe9JokapXT-qN=L6Zg_0Nv0fk35vi7_YbA@mail.gmail.com>
> On Jul 13, 2020, at 7:39 PM, Wells Oliver <wells.oliver@gmail.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.)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: scott_ribe@elevated-dev.com, wells.oliver@gmail.com
Subject: Re: Joining between large & small tables?
In-Reply-To: <258F84EA-9EF3-43C0-B3FC-82E9154EDE54@elevated-dev.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox