Search Postgresql Archives

Re: Dead Lock problem with 8.1.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxx

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 //


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux