Re: fate of CLUSTER command ? - Mailing list pgsql-hackers

From Ross J. Reedstrom
Subject Re: fate of CLUSTER command ?
Date
Msg-id 20020807052453.GB5933@rice.edu
Whole thread Raw
In response to Re: fate of CLUSTER command ?  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
On Sun, Aug 04, 2002 at 11:17:03PM -0400, Bruce Momjian wrote:
> Christopher Kings-Lynne wrote:
> > > Clustering on one index doesn't decrease the performance of the other
> > > indexes.  Also, only >=7.3 will preserve all indexes during cluster.
> > 
> > Sure it must?  Since you are rearranging all on-disk rows to match a
> > particular index (say user_id, username) then it will slow down other
> > indexes (eg one just on username).
> 
> It will slow down other index scans only if there was some clustering on
> those indexes before you ran the CLUSTER command.

Actually, it would depend on the level of correlation between the values
indexed. If there's some correlation, performance using the second index
could improve some - if they're anti-correlated, it will decrease. If
uncorrelated, there should be no effect.

Ross


pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: Re: Open 7.3 items
Next
From: Curt Sampson
Date:
Subject: Re: CLUSTER and indisclustered