Re: Dead Lock problem with 8.1.3

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: Dead Lock problem with 8.1.3
Дата
Msg-id 451936F4.6060007@magproductions.nl
обсуждение исходный текст
Ответ на Re: Dead Lock problem with 8.1.3  (Kai Hessing <kai.hessing@hobsons.de>)
Ответы Re: Dead Lock problem with 8.1.3  (Kai Hessing <kai.hessing@hobsons.de>)
Список pgsql-general
Kai Hessing wrote:
> No one any idea? *sigh*
>
> Kai Hessing wrote:
>> Hi Folks,
>>
>> I have a strange Problem (to be honest there are more than one, but this
>> is one of it) after Upgrading to Postgres 8.1.3. The following SQL seems
>> to produce a deadlock while doing an endless reading of a temp table:
>>
>> SELECT s.sid FROM stud s, stud_vera v WHERE s.sid = v.sid AND v.veraid =
>> 34 AND s.sid NOT IN ( SELECT sid FROM stud_vera WHERE veraid = 2 );

I'm pretty sure it's not a deadlock. It probably takes very long for
some reason; maybe an explain of that query will give some insight. You
probably lack some indices.

Alternatively, have you tried an EXCEPT query? I think this is what you
try to query:

SELECT s.sid FROM stud s, stud_vera v WHERE s.sid = v.sid AND v.veraid = 34
EXCEPT
SELECT s.sid FROM stud s, stud_vera v WHERE s.sid = v.sid AND v.veraid = 2


--
Alban Hertroys
alban@magproductions.nl

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
    7500 AK Enschede

// Integrate Your World //

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: change the order of FROM selection to make query work
Следующее
От: Joe Conway
Дата:
Сообщение: Re: Dead Lock problem with 8.1.3