X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 92A9752B5B for ; Thu, 14 Jul 2005 13:41:40 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 34498-06 for ; Thu, 14 Jul 2005 16:41:37 +0000 (GMT) Received: from twiddle.look.ca (beta1.look.ca [207.136.80.125]) by svr1.postgresql.org (Postfix) with ESMTP id 9609452AA1 for ; Thu, 14 Jul 2005 13:41:36 -0300 (ADT) Received: from 209-161-193-204.dsl.look.ca ([209.161.193.204]) by twiddle.look.ca with esmtp (Exim 4.20) id 1Dt6mE-0000fS-RR; Thu, 14 Jul 2005 16:41:34 +0000 From: Rod Taylor To: Alison Winters Cc: pgsql-performance@postgresql.org In-Reply-To: <42D5F34E.nail9QE1195IE@pluto.mirrabooka.com> References: <42D5F34E.nail9QE1195IE@pluto.mirrabooka.com> Date: Thu, 14 Jul 2005 12:37:42 -0400 Message-Id: <1121359062.780.31.camel@home> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port X-SA-Exim-Mail-From: pg@rbt.ca Subject: Re: lots of updates on small table Content-Type: text/plain Content-Transfer-Encoding: 7bit X-SA-Exim-Version: 3.1 (built Tue Feb 24 05:09:27 GMT 2004) X-SA-Exim-Scanned: Yes X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.041 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200507/182 X-Sequence-Number: 13423 On Thu, 2005-07-14 at 15:08 +1000, Alison Winters wrote: > Hi, > > Our application requires a number of processes to select and update rows > from a very small (<10 rows) Postgres table on a regular and frequent > basis. These processes often run for weeks at a time, but over the Are these long running transactions or is the process issuing many short transactions? If your transaction lasts a week, then a daily vacuum isn't really doing anything. I presume you also run ANALYZE in some shape or form periodically? > space of a few days we find that updates start getting painfully slow. > We are running a full vacuum/analyze and reindex on the table every day, If they're short transactions, run vacuum (not vacuum full) every 100 or so updates. This might even be once a minute. Analyze periodically as well. --