Re: Clustered index? - Mailing list pgsql-novice

From Stephen Cook
Subject Re: Clustered index?
Date
Msg-id 4629DF4F.7080505@gmail.com
Whole thread Raw
In response to Re: Clustered index?  (Michael Fuhr <mike@fuhr.org>)
List pgsql-novice
A clustered index is an index whose leaf nodes (in the b-tree) contain
the data pages, and they are physically sorted on this index.

CLUSTER looks similar, except with PostgreSQL it is not kept sorted,
whereas SQL Server guarantees that the data stays sorted on this index
(by definition).  So with one you pay a bit for any insert that does not
belong at the end, while with the other you have to periodically pay all
at once (re-cluster) for the same conditions.

Thanks for the link, somehow I missed that when I was reading through
the documentation.  It is a bit weird getting my head around this after
dealing with only one vender for several years.




Michael Fuhr wrote:
> On Sat, Apr 21, 2007 at 03:22:59AM -0400, Stephen Cook wrote:
>> I come from a MS SQL Server background, but I am planning on using
>> PostgreSQL to take over the world in my own way.
>>
>> What (if it exists) is the equivalent of a clustered index in SQLServer?
>
> What does "clustered index" mean in SQL Server?  Here's what it
> means in PostgreSQL:
>
> http://www.postgresql.org/docs/8.2/interactive/sql-cluster.html
>

pgsql-novice by date:

Previous
From: Michael Fuhr
Date:
Subject: Re: Clustered index?
Next
From: Andrew Jarcho
Date:
Subject: call pl/pgsql stored functions from ecpg?