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 6920B32A53B for ; Tue, 19 Oct 2004 17:21:08 +0100 (BST) 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 50862-08 for ; Tue, 19 Oct 2004 16:21:06 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id F36EF32A540 for ; Tue, 19 Oct 2004 17:21:05 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id i9JGL5nA016630; Tue, 19 Oct 2004 12:21:05 -0400 (EDT) To: Max Baker Cc: pgsql-performance@postgresql.org Subject: Re: Vacuum takes a really long time, vacuum full required In-reply-to: <20041019153821.GA21258@warped.org> References: <20041019153821.GA21258@warped.org> Comments: In-reply-to Max Baker message dated "Tue, 19 Oct 2004 11:38:21 -0400" Date: Tue, 19 Oct 2004 12:21:04 -0400 Message-ID: <16629.1098202864@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/278 X-Sequence-Number: 8754 Max Baker writes: > I've been having problems maintaining the speed of the database in the > long run. VACUUMs of the main tables happen a few times a day after maybe > 50,000 or less rows are added and deleted (say 6 times a day). > I have a whole lot (probably too much) indexing going on to try to speed > things up. > Whatever the case, the database still slows down to a halt after a month or > so, and I have to go in and shut everything down and do a VACUUM FULL by > hand. One index (of many many) takes 2000 seconds to vacuum. The whole > process takes a few hours. The first and foremost recommendation is to increase your FSM settings; you seem to be using the defaults, which are pegged for a database size of not more than about 100Mb. Second is to update to PG 7.4. I think you are probably suffering from index bloat to some extent, and 7.4 should help. regards, tom lane