Re: Two efficiency questions - clustering and ints

From: "John D(dot) Burger" <john(at)mitre(dot)org>
To: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Two efficiency questions - clustering and ints
Date: 2006-10-06 18:12:23
Message-ID: 69759D36-7345-4AD7-A63E-7F3457E5CB76@mitre.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Richard Huxton wrote:

>> Should I always cluster the tables? That is, even if no column
>> jumps out as being involved in most queries, should I pick a
>> likely one and cluster on it?
>
> Well you cluster on an index, and if you don't think the index is
> useful, I'd drop it. If you have an index, clustering isn't
> necessarily going to help you unless you regularly read a series of
> rows in order.

Right, but clustering on that index means an index scan (with that
index) will be faster. This is uninteresting if the index doesn't
get used, but is there any =downside= to doing it?

Here's a simpler question - for static data, should I always cluster
on the index I think will be used the most?

Thanks.

- John D. Burger
MITRE

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Worky Workerson 2006-10-06 18:23:49 DELETE eats up all memory and crashes box
Previous Message andy rost 2006-10-06 17:50:22 URGENT - startup process (PID 29541) was terminated by signal 6