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

Fw: It worked! Was :Re: Select Statement Hang...

From: "Chad Thompson" <chad(at)weblinkservices(dot)com>
To: "pgsql-novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Fw: It worked! Was :Re: Select Statement Hang...
Date: 2003-07-22 14:36:02
Message-ID: 00a601c3505e$9442a790$32021aac@chad (view raw or flat)
Thread:
Lists: pgsql-novice
----- Original Message ----- 
From: "ttzhang" <ttzhang(at)uclink(dot)berkeley(dot)edu>
To: "Chad Thompson" <chad(at)weblinkservices(dot)com>
Sent: Monday, July 21, 2003 7:09 PM
Subject: It worked!


> I got the two table names wrong. :)
>
> This one also works:
>
> Thank you so much!
>
> >===== Original Message From "Chad Thompson" <chad(at)weblinkservices(dot)com>
=====
> >I forgot that I usually link the tables in the sub select.
> >
> >select id
> >from btable b
> >where not exists
> >(select id
> >from atable a
> >where a.id = b.id)
> >
> >Hope that helps
> >Chad
> >
> >----- Original Message -----
> >From: "ttzhang" <ttzhang(at)uclink(dot)berkeley(dot)edu>
> >To: <pgsql-novice(at)postgresql(dot)org>
> >Sent: Sunday, July 13, 2003 2:49 PM
> >Subject: [NOVICE] Select Statement Hang...
> >
> >
> >> I was trying to set up a foreign key for an id field but found out that
> >some
> >> of the ids are not in the referenced table.  To look things up, I tried
> >>
> >> select id from btable where id not in (select id from atable)
> >>
> >> The query just hang.....  My tables are pretty big (200, 000?)  can
anyone
> >> help me to pinpoint the problem?
> >>
> >> Thanks!
> >>
> >>
> >>
> >> ---------------------------(end of
broadcast)---------------------------
> >> TIP 5: Have you checked our extensive FAQ?
> >>
> >>                http://www.postgresql.org/docs/faqs/FAQ.html
> >>
>
>
>


pgsql-novice by date

Next:From: Ravi AVKDate: 2003-07-22 14:59:22
Subject: Need clarifications......
Previous:From: Tom LaneDate: 2003-07-22 14:32:51
Subject: Re: Encrypted data.

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