Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 8D42C1337B68 for ; Wed, 23 Mar 2011 01:25:00 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 50971-01 for ; Wed, 23 Mar 2011 04:24:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-px0-f174.google.com (mail-px0-f174.google.com [209.85.212.174]) by mail.postgresql.org (Postfix) with ESMTP id B67741337999 for ; Wed, 23 Mar 2011 01:24:52 -0300 (ADT) Received: by pxi15 with SMTP id 15so1314995pxi.33 for ; Tue, 22 Mar 2011 21:24:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=k160i3M+vhGI1fD7Gt266VDVTgGjyfgGKGi8IOaHtrs=; b=ZJrmeLzdKYPzrjV/tU0sG2gNAWbXbuFsGkBEA8V4ISpQUlhSsg9EmFR3vnaC14zpv7 yp0dJiS68O++xytrDJy3XayMWQu1zZo/PrJ5+ggnYj90CbZmnCofIydXBmDuppxTX6rJ GWui2gng+XI/BcBNIb+aIRsQqEaZsBAM05rV4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=pLeyBWWgxFLNkA/iInsjgzE7dqtXVJAaJz7G3xW/japUvez6oAmhsjjCQLewOIlM/N KpNngn2SNeWkPMcheZfktAxgAy0vDLVG7vVh4Eyt+OMnGOcmrhmTTV7BxFaFlQm6sbt1 2Pa40ntAXqOy1pZRM7AXjwCt56GxsOCgLci5o= Received: by 10.143.39.17 with SMTP id r17mr4903004wfj.113.1300854289963; Tue, 22 Mar 2011 21:24:49 -0700 (PDT) Received: from [192.168.2.65] (ppp234-39.static.internode.on.net [59.167.234.39]) by mx.google.com with ESMTPS id p40sm9533895wfc.5.2011.03.22.21.24.46 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 22 Mar 2011 21:24:48 -0700 (PDT) Message-ID: <4D89760A.3040109@gmail.com> Date: Wed, 23 Mar 2011 15:24:42 +1100 From: Chris User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: pgsql-performance@postgresql.org Subject: Re: good old VACUUM FULL References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.589 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201103/250 X-Sequence-Number: 42929 On 23/03/11 11:52, felix wrote: > I posted many weeks ago about a severe problem with a table that was > obviously bloated and was stunningly slow. Up to 70 seconds just to get > a row count on 300k rows. > > I removed the text column, so it really was just a few columns of fixed > data. > Still very bloated. Table size was 450M > > The advice I was given was to do CLUSTER, but this did not reduce the > table size in the least. > Nor performance. > > Also to resize my free space map (which still does need to be done). > Since that involves tweaking the kernel settings, taking the site down > and rebooting postgres and exposing the system to all kinds of risks and > unknowns and expensive experimentations I was unable to do it and have > had to hobble along with a slow table in my backend holding up jobs. > > Much swearing that nobody should ever do VACUUM FULL. Manual advises > against it. Only crazy people do that. > moral of the story: if your table is really bloated, just do VACUUM FULL You'll need to reindex that table now - vacuum full can bloat your indexes which will affect your other queries. reindex table fastadder_fastadderstatus; -- Postgresql & php tutorials http://www.designmagick.com/