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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Dead Lock problem with 8.1.3



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(at)magproductions(dot)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 //



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group