From: | Scott Marlowe <smarlowe(at)g2switchworks(dot)com> |
---|---|
To: | MaXX <bs139412(at)skynet(dot)be> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Clustered indexes - When to use them? |
Date: | 2005-11-02 20:08:25 |
Message-ID: | 1130962104.15018.109.camel@state.g2switchworks.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, 2005-11-02 at 13:50, MaXX wrote:
> Ok thank you,
> so I can consider using clustered indexes when I need to 'reorder' random
> data to improve the speed of a particular query...
>
> In simple words:
> Clustered indexes are like the alphabetical index in a book, where term are
> randomly distibuted in the book and regular indexes are more like the table
> of content...
> Right?
Not really. It's more like if someone reordered the book so that it was
in the same order as whatever index you have in it. So, if the index
was on the length of the words, the words in the book would be reordered
to be smallest to largest (or reverse that). If the index were on just
the words themselves, then the book would have the words reordered from
A to Z etc...
Note that clustered indexes do not dynamically update the table order in
postgresql. If you're gonna insert to them, you need to recluster them
every so often.
From | Date | Subject | |
---|---|---|---|
Next Message | Jim C. Nasby | 2005-11-02 20:11:35 | Re: Oracle 10g Express - any danger for Postgres? |
Previous Message | Robert Treat | 2005-11-02 20:07:02 | Re: looking for multi-language app example using postgresql |