From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bryce Nesbitt <bryce1@obviously.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Very slow updates when using IN syntax subselect
Date: Fri, 10 Feb 2006 16:32:56 -0500
Message-ID: <1682.1139607176@sss.pgh.pa.us> (raw)
In-Reply-To: <43ECFF0B.80905@obviously.com>
References: <43ECFF0B.80905@obviously.com>
Bryce Nesbitt <bryce1@obviously.com> writes:
> update event set reconciled=true where event_id in
> (select event_id from event join token using (token_number)
> where token_status=50 and reconciled=false LIMIT 1);
> On a 4 CPU machine, 2 CPU's peg at 100%, and the request just eats CPU
> forever.
What does EXPLAIN show for this and for the base query?
> PostgreSQL 7.4.1 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.2.3
This may be your problem right here. You are urgently in need of an
update in any case --- there are a lot of nasty bugs fixed since 7.4.1:
http://developer.postgresql.org/docs/postgres/release.html
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, bryce1@obviously.com
Subject: Re: Very slow updates when using IN syntax subselect
In-Reply-To: <1682.1139607176@sss.pgh.pa.us>
References: <43ECFF0B.80905@obviously.com> <1682.1139607176@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox