Fw: It worked! Was :Re: Select Statement Hang...
От | Chad Thompson |
---|---|
Тема | Fw: It worked! Was :Re: Select Statement Hang... |
Дата | |
Msg-id | 00a601c3505e$9442a790$32021aac@chad обсуждение исходный текст |
Список | pgsql-novice |
----- Original Message ----- From: "ttzhang" <ttzhang@uclink.berkeley.edu> To: "Chad Thompson" <chad@weblinkservices.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@weblinkservices.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@uclink.berkeley.edu> > >To: <pgsql-novice@postgresql.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 по дате отправления: