Re: [GENERAL] CLUSTER command - Mailing list pgsql-performance

From Jean-Luc Lachance
Subject Re: [GENERAL] CLUSTER command
Date
Msg-id 3DF90A89.61040846@nsd.ca
Whole thread Raw
In response to Re: [GENERAL] CLUSTER command  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: [GENERAL] CLUSTER command  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-performance
The current cluster command is equivalant to:

create b as select * from a order by i;

So you would not be loosing anything.



Stephan Szabo wrote:
>
> On Thu, 12 Dec 2002, Jean-Luc Lachance wrote:
>
> > Hi all,
> >
> > I just read about the cluster command and was a little (very)
> > disapointed.
> > Clustered tables do not remain clustered after inserts.
> > Clustered tables are usefull when the table is very large and there are
> > few different keys.
> >
> >
> > Because the table file is already extended (2G limit) using different
> > files extension (.N)
> > how complicated (modifying the code) would it be to have the table files
> > split according to the cluster key?
>
> I'd vote against changing the existing CLUSTER since the existing CLUSTER
> while not great does handle many different key values fairly well as well
> and this solution wouldn't.  Many different key values are still
> useful to cluster if you're doing searches over ranges since it lowers the
> number of heap file reads necessary.  If done this should probably be
> separate from the existing cluster or at least both versions should be
> possible.

pgsql-performance by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: [GENERAL] CLUSTER command
Next
From: johnnnnnn
Date:
Subject: Re: [GENERAL] CLUSTER command