Re: fate of CLUSTER command ?

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: fate of CLUSTER command ?
Date: 2002-08-07 05:24:53
Message-ID: 20020807052453.GB5933@rice.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Curt Sampson 2002-08-07 05:30:02 Re: CLUSTER and indisclustered
Previous Message Tom Lane 2002-08-07 05:12:28 Re: CLUSTER and indisclustered