Re: problematic query (for me ;-) [solved? - sorry to bother]

From: Kim Petersen <kp(at)kyborg(dot)dk>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: problematic query (for me ;-) [solved? - sorry to bother]
Date: 2003-03-05 14:47:40
Message-ID: 3E660E0C.2020605@kyborg.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Kim Petersen wrote:
> I'm trying to get a hint as to how i can solve this problem:

it seems it works to post to a newsgroup - i've been trying to solve
this for hours - and just came up with a solution - only question now is
whether or not it is usable (on millons of tuples).

select distinct t1.n,t2.n from test t1,test t2
where not exists
(select t from test where n=t1.n
intersect
select t from test where n=t2.n);

optimization ideas would be greatly appreciated.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Achilleus Mantzios 2003-03-05 15:21:34 Re: DELETE FROM A BLACK LIST
Previous Message Gary Stainburn 2003-03-05 14:37:47 sort / limit / range problem