Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id CBCA72E0032 for ; Wed, 27 Feb 2008 13:01:48 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 21056-01 for ; Wed, 27 Feb 2008 13:01:40 -0400 (AST) X-Greylist: delayed 00:59:20.876449 by SQLgrey-1.7.5 Received: from hunley.homeip.net (hunley.homeip.net [69.12.222.146]) by postgresql.org (Postfix) with ESMTP id 3B0FD2E004B for ; Wed, 27 Feb 2008 13:01:41 -0400 (AST) Received: from douglas.hunley.homeip.net (d60-34-189.col.wideopenwest.com [65.60.189.34]) (authenticated bits=0) by hunley.homeip.net (8.13.1/8.13.1) with ESMTP id m1RG22K3031325 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 27 Feb 2008 11:02:09 -0500 From: Douglas J Hunley To: pgsql-performance@postgresql.org Subject: questions about CLUSTER Date: Wed, 27 Feb 2008 11:01:57 -0500 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802271101.57169.doug@hunley.homeip.net> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (hunley.homeip.net [69.12.222.146]); Wed, 27 Feb 2008 11:02:09 -0500 (EST) X-Virus-Scanned: ClamAV version 0.92.1, clamav-milter version 0.92.1 on hunley.homeip.net X-Virus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL=0.004 X-Spam-Level: X-Archive-Number: 200802/371 X-Sequence-Number: 28913 After reviewing http://www.postgresql.org/docs/8.3/static/sql-cluster.html a couple of times, I have some questions: 1) it says to run analyze after doing a cluster. i'm assuming autovacuum will take care of this? or should i go ahead and do the analyze 'now' instead of waiting? 2) is there any internal data in the db that would allow me to programmatically determine which tables would benefit from being clustered? 3) for that matter, is there info to allow me to determine which index it should be clustered on in cases where the table has more than one index? 4) for tables with >1 indexes, does clustering on one index negatively impact queries that use the other indexes? 5) is it better to cluster on a compound index (index on lastnamefirstname) or on the underlying index (index on lastname)? tia -- Douglas J Hunley (doug at hunley.homeip.net) - Linux User #174778 http://doug.hunley.homeip.net Everything takes twice as long as you plan for and produces results about half as good as you hoped.