Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 12A029FB1D2 for ; Thu, 5 Oct 2006 05:35:16 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 50267-07 for ; Thu, 5 Oct 2006 08:34:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from webmail.enterprisedb.com (edb04.managed.contegix.com [63.246.7.176]) by postgresql.org (Postfix) with ESMTP id 4FAB99FB1DD for ; Thu, 5 Oct 2006 05:34:55 -0300 (ADT) Received: from [192.168.0.20] (unknown [62.232.55.86]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by webmail.enterprisedb.com (Postfix) with ESMTP id 27DA1A24DF6; Thu, 5 Oct 2006 03:34:51 -0500 (CDT) Message-ID: <4524C3B5.8030206@enterprisedb.com> Date: Thu, 05 Oct 2006 09:35:01 +0100 From: Heikki Linnakangas User-Agent: Thunderbird 1.5.0.7 (X11/20060915) MIME-Version: 1.0 To: Mark Woodward CC: pg@mohawksoft.com, pgsql-hackers@postgresql.org Subject: Re: Netflix Prize data References: <18350.24.91.171.78.1159994622.squirrel@mail.mohawksoft.com> In-Reply-To: <18350.24.91.171.78.1159994622.squirrel@mail.mohawksoft.com> 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=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/269 X-Sequence-Number: 92166 Mark Woodward wrote: > > I tried to cluster the data along a particular index but had to cancel it > after 3 hours. If the data is in random order, it's faster to do SELECT * INTO foo_sorted FROM foo ORDER BY bar then CREATE INDEX, than to run CLUSTER. That's because CLUSTER does a full index scan of the table, which is slower than a seqscan + sort if the table is not already clustered. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com