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 CF0D38BA16F for ; Tue, 15 Feb 2005 08:47:41 +0000 (GMT) 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 04154-09 for ; Tue, 15 Feb 2005 08:47:38 +0000 (GMT) Received: from boutiquenumerique.com (boutiquenumerique.com [82.67.9.10]) by svr1.postgresql.org (Postfix) with ESMTP id 2CB998BA15B for ; Tue, 15 Feb 2005 08:47:36 +0000 (GMT) Received: (qmail 2553 invoked from network); 15 Feb 2005 09:48:07 +0100 Received: from unknown (HELO musicbox) (boutiquenumerique-lists@192.168.0.2) by boutiquenumerique.com with SMTP; 15 Feb 2005 09:48:07 +0100 To: pgsql-performance@postgresql.org Subject: Re: VACCUM FULL ANALYZE PROBLEM References: <200502150202.j1F22flW029903@mail.census.gov.ph> <009201c51306$6e9ece80$7201a8c0@mst1x5r347kymb> <8499.1108445430@sss.pgh.pa.us> Message-ID: Date: Tue, 15 Feb 2005 09:51:22 +0100 From: PFC Organization: =?iso-8859-15?Q?La_Boutique_Num=E9rique?= Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In-Reply-To: <8499.1108445430@sss.pgh.pa.us> User-Agent: Opera M2/7.54u1 (Linux, build 892) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200502/236 X-Sequence-Number: 10565 I don't know if this would work, but if you just want to restructure your rows, your could do this: UPDATE table SET id = id WHERE id BETWEEN 0 AND 20000; VACUUM table; UPDATE table SET id = id WHERE id BETWEEN 20001 AND 40000; VACUUM table; wash, rinse, repeat. The idea is that an update rewrites the rows (in your new format) and that VACUUM (not FULL) is quite fast when you just modified a part of the table, and non-locking. Would this work ? > "Iain" writes: >>> another way to speed up full vacuum? > >> Hmmm... a full vacuum may help to re-organize the structure of modified >> tables, but whether this is significant or not is another matter. > > Actually, VACUUM FULL is designed to work nicely for the situation where > a table has say 10% wasted space and you want the wasted space all > compressed out. When there is a lot of wasted space, so that nearly all > the rows have to be moved to complete the compaction operation, VACUUM > FULL is not a very good choice. And it simply moves rows around, it > doesn't modify the rows internally; so it does nothing at all to reclaim > space that would have been freed up by DROP COLUMN operations. > > CLUSTER is actually a better bet if you want to repack a table that's > suffered a lot of updates or deletions. In PG 8.0 you might also > consider one of the rewriting variants of ALTER TABLE. > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org >