Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 2EE689FB6E4 for ; Mon, 23 Apr 2007 15:26:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 51202-04 for ; Mon, 23 Apr 2007 15:26:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from gwmta.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by postgresql.org (Postfix) with ESMTP id 0956D9FB69C for ; Mon, 23 Apr 2007 15:26:19 -0300 (ADT) Received: from Courts-MTA by gwmta.wicourts.gov with Novell_GroupWise; Mon, 23 Apr 2007 13:26:18 -0500 Message-Id: <462CB3EE.EE98.0025.0@wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 7.0.1 Date: Mon, 23 Apr 2007 13:26:07 -0500 From: "Kevin Grittner" To: "Heikki Linnakangas" , "Nelson Kotowski" Cc: Subject: Re: TPC-H Scaling Factors X PostgreSQL Cluster Command References: <462C8085.3020602@enterprisedb.com> In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/396 X-Sequence-Number: 24273 >>> On Mon, Apr 23, 2007 at 10:52 AM, in message , "Nelson Kotowski" wrote:=20 >=20 > I don't get how creating only the indexes i cluster on would improve my > cluster command perfomance. I believed that all other indexes wouldn't > interfere because so far they're created in a fashionable time and they > don't refer to any field/column in the orders/lineitem table. Could you > explain me again? =20 What a CLUSTER command does is to read through the table in the sequence = specified by the index (using the index) and copy the data into a new copy = of the table. It then applies all of the permissions, constraints, etc. = from the original table to the copy and builds all the same indexes as = were on the original table. (You can't use the same indexes, because the = data is shifted around to new spots.) The new copy of the table then = takes the place of the original. If you build indexes and then cluster, = you throw away the results of the work from the original build, and do it = all over again. =20 > As for the load, when you say the right order to start, you mean i = should > order the load file by the index field in the table before loading it? =20 If you load the rows in the same order that the index would read them = during the cluster, there is no need to cluster and no benefit from doing = so. =20 -Kevin =20