Hi,
the problem is a combination of bad formed SQL and maybe missing indexes.
try this:
UPDATE t1
SET booleanfield = foo.bar
FROM (SELECT uid,(field IN ('some','other') AND field2 = 'Y') AS bar FROM
t2) AS foo
WHERE t1.uid=foo.uid;
and index t1.uid, t2.uid, t2.field, t2.field2
regards,
Jens
On Wed, 13 Dec 2006 13:23:41 +0100, Arnaud Lesauvage [EMAIL PROTECTED]
wrote:
Jens Schipkowski a écrit :
the problem is a combination of bad formed SQL and maybe missing
indexes.
try this:
UPDATE t1
SET booleanfield = foo.bar
FROM (SELECT uid,(field IN ('some','other') AND field2 = 'Y
in advance,
Jens Schipkowski
--
**
APUS Software GmbH
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through
posted by mallah. It looks like you are using
prepared statements, which are not available to us.
But I will check our database access if its possible to do a workaround,
because this looks clean and quick to me.
regards
Jens Schipkowski
On Mon, 11 Dec 2006 17:53:52 +0100, Guillaume Cottenceau
not
match
CU,
Jens
--
**
Jens Schipkowski
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
)'.
Cheers
Sven
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
--
**
Dipl.-Designer Jens Schipkowski
APUS Software GmbH
---(end of broadcast)---
TIP 6: explain analyze is your friend
be unique (twins) and changes really often so
reindexing will took too long.
thanks,
Jens Schipkowski
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
On Thu, 19 Oct 2006 16:55:34 +0200, Richard Huxton dev@archonet.com
wrote:
Jens Schipkowski wrote:
Hi,
we've got performance problems due to repeating SELECT, UPDATE,
DELETE, INSERT statements. This statements have to be executed every 10
seconds, but they run into a timeout.
To obviate
On Thu, 19 Oct 2006 19:32:22 +0200, Merlin Moncure [EMAIL PROTECTED]
wrote:
On 10/19/06, Jens Schipkowski [EMAIL PROTECTED] wrote:
// select finds out which one has not an twin
// a twin is defined as record with the same attr* values
// decreases speed over time until timeout by postgresql