Re: primary/secondary index, difference

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "Thalis A(dot) Kalfigopoulos" <thalis(at)cs(dot)pitt(dot)edu>
Cc: <zilch(at)home(dot)se>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: primary/secondary index, difference
Date: 2001-06-18 15:51:51
Message-ID: Pine.LNX.4.30.0106181749440.898-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thalis A. Kalfigopoulos writes:

> I was under the impression that primary index is the same as clustered index i.e. the order in the index matches the physical order the records are stored on disk thus making it better when doing sequential accesses.
> I assume that this is exactly the use of the CLUSTER command, to actually make a primary index. T/F?

No, cluster just orders the table after the index at the time it's called.
Subsequent writes will not obey that order (new rows generally go at the
end).

--
Peter Eisentraut peter_e(at)gmx(dot)net http://funkturm.homeip.net/~peter

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thalis A. Kalfigopoulos 2001-06-18 16:02:33 CREATE AGGREGATE state function with one argument
Previous Message Tom Lane 2001-06-18 15:23:25 Re: Apache with PHP and PGSQL crashing ...