Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 1C33EB5DC04 for ; Wed, 5 Oct 2011 15:16:06 -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 07053-01 for ; Wed, 5 Oct 2011 18:15:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 14701B5DC09 for ; Wed, 5 Oct 2011 15:15:58 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p95IFsNU023413; Wed, 5 Oct 2011 14:15:54 -0400 (EDT) To: Scott Marlowe cc: Greg Smith , pgsql-performance@postgresql.org Subject: Re: : Performance Improvement Strategy In-reply-to: References: <4E79E091.2030401@peak6.com> <4E79A6FF0200002500041506@gw.wicourts.gov> <4E7A259F.9060401@2ndQuadrant.com> Comments: In-reply-to Scott Marlowe message dated "Wed, 05 Oct 2011 11:09:45 -0600" Date: Wed, 05 Oct 2011 14:15:54 -0400 Message-ID: <23412.1317838554@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201110/61 X-Sequence-Number: 45283 Scott Marlowe writes: > It used to be that cluster on a very randomly ordered table was much > slower than doing something like select * into newtable from oldtable > order by col1, col2; Is that still the case in 9.0/9.1? Fixed in 9.1, per release notes: * Allow CLUSTER to sort the table rather than scanning the index when it seems likely to be cheaper (Leonardo Francalanci) regards, tom lane