Skip site navigation (1) Skip section navigation (2)

Re: Clustered index?

From: Stephen Cook <sclists(at)gmail(dot)com>
To: Michael Fuhr <mike(at)fuhr(dot)org>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Clustered index?
Date: 2007-04-21 09:54:23
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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:

In response to

pgsql-novice by date

Next:From: LeticiaDate: 2007-04-21 20:06:35
Subject: PostgreSQL configuration
Previous:From: Michael FuhrDate: 2007-04-21 07:27:37
Subject: Re: Clustered index?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group