Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id B7CA2632D83 for ; Mon, 29 Mar 2010 01:22:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 85135-01 for ; Mon, 29 Mar 2010 04:22:15 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mail.postgresql.org (Postfix) with ESMTP id 82DDA632F5C for ; Mon, 29 Mar 2010 01:21:39 -0300 (ADT) Received: from [192.168.0.105] (pool-96-244-14-10.bltmmd.fios.verizon.net [96.244.14.10]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MXCaX-1O1w1y3neP-00WMQe; Mon, 29 Mar 2010 06:21:37 +0200 Message-ID: <4BB02ACE.9000804@2ndquadrant.com> Date: Mon, 29 Mar 2010 00:21:34 -0400 From: Greg Smith User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: Pierre C CC: gnanam@zoniac.com, pgsql-performance@postgresql.org Subject: Re: Database size growing over time and leads to performance impact References: <004701cacdad$7013e9f0$503bbdd0$@com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX18hlfhzhLB/8uIh3ha52T8MXFFtgFErzEfVpe8 /VBszVig9K8LgvjW6AXsXCASqRwo//xulb0wGmiYkyotviB+/3 GqgoYtVHhx0Igt+7TD+p+M2KrO9qrvQ X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.082 tagged_above=-10 required=5 tests=AWL=-1.083, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 201003/361 X-Sequence-Number: 38186 Pierre C wrote: > If you realize you got a bloat problem, for instance due to a > misconfigured vacuum, use CLUSTER, which re-generates table AND index > data, and besides, having your table clustered on an index of your > choice can boost performance quite a lot in some circumstances. > > 8.2 is so old I don't remember if autovacuum is even included. Please > try upgrading to the latest version... In 8.2, it's included, but not turned on by default. And it can only have a single autovacuum worker, which limits its ability to keep up with more difficult workloads. As for CLUSTER, the implementation in 8.2 is limited compared to the 8.3 one. If you look at http://www.postgresql.org/docs/8.2/static/sql-cluster.html you'll see a scary paragraph starting with "CLUSTER loses all visibility information of tuples..." that is missing from later versions, because that problem was fixed in 8.3. I try to avoid using CLUSTER on 8.2 or earlier versions unless I can block all clients during the maintenance window it's running in. -- Greg Smith 2ndQuadrant US Baltimore, MD PostgreSQL Training, Services and Support greg@2ndQuadrant.com www.2ndQuadrant.us