pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John R Pierce <pierce@hogranch.com>
To: pgsql-general@postgresql.org
Subject: Re: Partitioning
Date: Sun, 18 Jan 2015 18:54:39 -0800
Message-ID: <54BC71EF.4050505@hogranch.com> (raw)
In-Reply-To: <CANkGpBvbnZFFhrRtOE4rTZPODFMgbaH-O5Xe4sK+NAFC08Rdpw@mail.gmail.com>
References: <CANkGpBvbnZFFhrRtOE4rTZPODFMgbaH-O5Xe4sK+NAFC08Rdpw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-general>

On 1/18/2015 5:58 PM, James Sewell wrote:
> WITH idlist as (SELECT id from othertable)
>     SELECT id from mastertable WHERE id = idlist.id <http://idlist.id;);


     select mt.id, ...   from mastertable mt join othertable ot on 
mt.id=ot.id;

might optimize better.



-- 
john r pierce                                      37N 122W
somewhere on the middle of the left coast

view thread (32+ messages)  latest in thread

Message-ID: <54BC71EF.4050505@hogranch.com>
Permalink:  ../54BC71EF.4050505@hogranch.com/
Also on:    postgresql.org/message-id/54BC71EF.4050505@hogranch.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: pierce@hogranch.com
  Subject: Re: Partitioning
  In-Reply-To: <54BC71EF.4050505@hogranch.com>
  References: <CANkGpBvbnZFFhrRtOE4rTZPODFMgbaH-O5Xe4sK+NAFC08Rdpw@mail.gmail.com> <54BC71EF.4050505@hogranch.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