Skip site navigation (1) Skip section navigation (2)

Re: dum query plan: more info.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jonathan Moore <moore(at)discern(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: dum query plan: more info.
Date: 2003-04-17 16:31:49
Message-ID: 11332.1050597109@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-performance
Jonathan Moore <moore(at)discern(dot)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


In response to

pgsql-performance by date

Next:From: dexDate: 2003-04-17 17:48:16
Subject: Performance of Inherits versus Views
Previous:From: Manfred KoizarDate: 2003-04-17 16:24:24
Subject: Re: dum query plan: more info.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group