From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jonathan Moore <moore@discern.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: dum query plan: more info.
Date: Thu, 17 Apr 2003 12:31:49 -0400
Message-ID: <11332.1050597109@sss.pgh.pa.us> (raw)
In-Reply-To: <1050530569.20873.120.camel@spunge-bob>
References: <1050530569.20873.120.camel@spunge-bob>
Jonathan Moore <moore@discern.com> writes:
> I now under stand that my join was rong but none of the seguestions are
> the optimal solution to the problime. You can make this order n if you
> try. The trick is to use a mearg join using sorted list of the unique
> keys in each colum join. The question you are asking is what left hand
> entrys do not exist on the right.
In that case maybe what you are after is
select a.* from a left join b on (a.left = b.right) where b.right is null;
which is a pretty grotty hack using the outer-join rules, but should
work efficiently.
regards, tom lane
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-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, moore@discern.com
Subject: Re: dum query plan: more info.
In-Reply-To: <11332.1050597109@sss.pgh.pa.us>
References: <1050530569.20873.120.camel@spunge-bob> <11332.1050597109@sss.pgh.pa.us>
* 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