RE: [GENERAL] Long update query ?

From: "Jackson, DeJuan" <djackson(at)cpsgroup(dot)com>
To: Sergei Chernev <ser(at)nsu(dot)ru>, pgsql-general(at)postgreSQL(dot)org
Subject: RE: [GENERAL] Long update query ?
Date: 1998-09-28 15:05:34
Message-ID: F10BB1FAF801D111829B0060971D839F432E56@cpsmail
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

PostgreSQL 6.3 and lower has a problem with lots of OR's in the where
clause (the optimizer exhaust memory if I'm not mistaken). ProstgreSQL
6.4 will handle OR's better. In the mean time I'd suggest rewriting
your queries (don't forget that you can use IN/NOT IN).
-DEJ

> Hello,
> I have query:
> UPDATE userd_session_stat SET status =1 WHERE status=0 AND ((uid <>627
> AND
> tty <>'ttyA03') OR (uid <> 425 AND tty <> 'ttyA05') OR (uid <> 8011
> AND tty
> <> 'ttyA09') OR (uid <> 2092 AND tty <> 'ttyA0f') OR (uid <> 249 AND
> tty <>
> 'ttyp3') OR (uid <> 249 AND tty <> 'ttyp4') OR (uid <> 249 AND tty <>
> 'ttyp5') OR (uid <> 249 AND tty <> 'ttyp6'))
>
> But, postgres complains that:
> FATAL 1: palloc failure: memory exhausted
>
> I see, the query must be less than 4kB, and this query is less.
> Long SELECT queries works fine.
> Have any idea? Maybe, I have to change postmaster's settings ? Query
> executes from libpg programm.
>
> Thanx,
> ---------------------------
> Sergei Chernev
> Internet: ser(at)nsu(dot)ru
> Phone: +7-3832-397354
>

Browse pgsql-general by date

  From Date Subject
Next Message bboyd 1998-09-28 15:07:16 unsubscribe
Previous Message Jackson, DeJuan 1998-09-28 14:48:50 RE: [GENERAL] slow queries