Received: from ece.rice.edu (ece.rice.edu [128.42.4.34]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f86JFO791861 for ; Thu, 6 Sep 2001 15:15:24 -0400 (EDT) (envelope-from reedstrm@rice.edu) Received: from wallace.ece.rice.edu (wallace.ece.rice.edu [128.42.12.154]) by ece.rice.edu (Postfix) with ESMTP id 77FC368A14; Thu, 6 Sep 2001 14:15:22 -0500 (CDT) Received: from reedstrm by wallace.ece.rice.edu with local (Exim 3.22 #1 (Debian)) id 15f4cU-0000se-00; Thu, 06 Sep 2001 14:15:22 -0500 Date: Thu, 6 Sep 2001 14:15:22 -0500 From: "Ross J. Reedstrom" To: Jeff Boes Cc: pgsql-admin@postgresql.org Subject: Re: Poor performance of UPDATE against busy table Message-ID: <20010906141522.A3371@rice.edu> Mail-Followup-To: "Ross J. Reedstrom" , Jeff Boes , pgsql-admin@postgresql.org References: <9n8fcr$2oqo$1@news.tht.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9n8fcr$2oqo$1@news.tht.net> User-Agent: Mutt/1.3.18i X-Archive-Number: 200109/22 X-Sequence-Number: 2122 You don't mention your version of pgsql, but if you get a lot of throughput on that table, how often do you VACUUM it? All those dead tuples take space that has to be scanned through, since indices don't keep track of tuple state. Ross On Thu, Sep 06, 2001 at 02:31:51PM -0400, Jeff Boes wrote: > We have a table being used as a job queue. There's one 'scheduler' > process that manipulates jobs (inserting, updating, and deleting rows/jobs as > they change status). There are a number (~24) of processes reading and > updating rows as they 'claim' and 'complete' jobs. > > Our problem is that throughput on this table is fairly low. Updates by > the 'scheduler' sometimes take 15 seconds (!!). We've tried various > combinations of LOCK TABLE commands, but without much success. > > Does anyone know if there are ways to improve the performance of UPDATE > against a table where there are many readers? > > > -- > Jeff Boes vox 616.226.9550 > Database Engineer fax 616.349.9076 > Nexcerpt, Inc. jboes@nexcerpt.com > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://www.postgresql.org/search.mpl