X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 140E39DCC54 for ; Wed, 21 Dec 2005 20:04:12 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 47572-03 for ; Wed, 21 Dec 2005 20:04:14 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (floppy.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 1E0719DCC67 for ; Wed, 21 Dec 2005 20:04:09 -0400 (AST) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id 5975A3093D; Thu, 22 Dec 2005 01:04:12 +0100 (MET) From: Chris Browne X-Newsgroups: pgsql.sql Subject: Re: Does VACUUM reorder tables on clustered indices Date: Wed, 21 Dec 2005 18:36:45 -0500 Organization: cbbrowne Computing Inc Lines: 25 Message-ID: <60d5jqja42.fsf@dba2.int.libertyrms.com> References: <1134940325.43a5d0a5a882e@webmail.adontendev.net> <20051218220139.GA1651@surnet.cl> <20051220214124.GR28771@pervasive.com> <00e001c605bd$e23ca1a0$0600000a@d505> <20051221003339.GB72143@pervasive.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Complaints-To: usenet@news.hub.org User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (Jumbo Shrimp, linux) Cancel-Lock: sha1:hwti3wCLAbjHLoOBjj6sBPp8qTw= To: pgsql-sql@postgresql.org X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.111 required=5 tests=[AWL=0.111] X-Spam-Score: 0.111 X-Spam-Level: X-Archive-Number: 200512/194 X-Sequence-Number: 23736 jnasby@pervasive.com ("Jim C. Nasby") writes: > On Wed, Dec 21, 2005 at 12:34:12AM +0100, ipv@tinet.org wrote: >> Hi, >> >> Utilize CLUSTER; (after vacuum) to reorder the data. > > Why would you vacuum when cluster is just going to wipe out the dead > tuples anyway? There is one reason to VACUUM before running CLUSTER... That is that VACUUM will be *guaranteed* to draw all the pages into memory. Subsequently, you can be certain that the pages are in cache, and that the CLUSTER should need to do minimal I/O to read data into memory. If I'm considering clustering the Slony-I "sl_log_1" table, forcing it into memory *is* something I'll consider doing in order to minimize the time that would-be writers are blocked from writing... -- let name="cbbrowne" and tld="cbbrowne.com" in String.concat "@" [name;tld];; http://cbbrowne.com/info/multiplexor.html Never criticize anybody until you have walked a mile in their shoes, because by that time you will be a mile away and have their shoes. -- email sig, Brian Servis