Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id D79939FCB85 for ; Thu, 8 Nov 2007 11:33:07 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 58706-04 for ; Thu, 8 Nov 2007 11:32:54 -0400 (AST) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 193F99FCB5F for ; Thu, 8 Nov 2007 11:33:02 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id lA8FX03b024776; Thu, 8 Nov 2007 10:33:00 -0500 (EST) To: Rafael Martinez cc: Heikki Linnakangas , pgsql-performance@postgresql.org Subject: Re: Need to run CLUSTER to keep performance In-reply-to: <47332200.9050705@usit.uio.no> References: <4732E6B4.1030907@usit.uio.no> <4732EF07.3060807@enterprisedb.com> <47332200.9050705@usit.uio.no> Comments: In-reply-to Rafael Martinez message dated "Thu, 08 Nov 2007 15:49:36 +0100" Date: Thu, 08 Nov 2007 10:33:00 -0500 Message-ID: <24775.1194535980@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200711/104 X-Sequence-Number: 27519 Rafael Martinez writes: > Heikki Linnakangas wrote: >> On a small table like that you could run VACUUM every few minutes >> without much impact on performance. That should keep the table size in >> check. > Ok, we run VACUUM ANALYZE only one time a day, every night. There's your problem. Reading between the lines I gather that you think an update is "free" in the sense of not creating a need for vacuum. It's not --- it's exactly equivalent to an insert + a delete, and it leaves behind a dead row that needs to be vacuumed. If you do a lot of updates, you need to vacuum. regards, tom lane