Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 8A4871337C82 for ; Tue, 29 Mar 2011 17:06:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 85861-01-8 for ; Tue, 29 Mar 2011 20:06:44 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id 200FE13388BB for ; Tue, 29 Mar 2011 16:28:17 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Tue, 29 Mar 2011 14:28:16 -0500 Message-Id: <4D91EC7E020000250003BEEC@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Tue, 29 Mar 2011 14:28:14 -0500 From: "Kevin Grittner" To: , "Lars Feistner" Subject: Re: very long updates very small tables References: <4D91EEFA.90707@uni-heidelberg.de> In-Reply-To: <4D91EEFA.90707@uni-heidelberg.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/361 X-Sequence-Number: 43040 Lars Feistner wrote: > The log tells me that certain update statements take sometimes > about 3-10 minutes. But we are talking about updates on tables > with 1000 to 10000 rows and updates that are supposed to update 1 > row. The top possibilities that come to my mind are: (1) The tables are horribly bloated. If autovacuum is off or not aggressive enough, things can degenerate to this level. (2) Memory is over-committed and your machine is thrashing. (3) There are explicit LOCK commands in the software which is contributing to the blocking. (4) There is some external delay within the transaction, such as waiting for user input while the transaction is open. Maybe there's a combination of the above at play. Can you rule any of these out? -Kevin