Re: CLUSTER command

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Rick Dicaire" <kritek(at)gmail(dot)com>,<pgsql-admin(at)postgresql(dot)org>
Subject: Re: CLUSTER command
Date: 2012-01-18 15:08:04
Message-ID: 4F168BF40200002500044900@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Rick Dicaire <kritek(at)gmail(dot)com> wrote:

> Hi folks...pgsql 8.1 (we're migrating to 9.1 later this year).

Good idea.

> When running CLUSTER with no args, on tables with multiple
> indexes, do I understand correctly that the tables' primary key is
> the default index used?

To quote the fine documentations at:

www.postgresql.org/docs/8.1/interactive/sql-cluster.html

| When a table is clustered, PostgreSQL remembers on which index it
| was clustered. The form CLUSTER tablename reclusters the table on
| the same index that it was clustered before.
|
| CLUSTER without any parameter reclusters all the tables in the
| current database that the calling user owns, or all tables if
| called by a superuser. (Never-clustered tables are not included.)

> Also, I've been tasked with finding and listing all the tables
> that get CLUSTER'd when CLUSTER with no args is executed,

http://www.postgresql.org/docs/8.1/interactive/catalog-pg-index.html

-Kevin

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Rick Dicaire 2012-01-18 18:54:10 Re: CLUSTER command
Previous Message Rick Dicaire 2012-01-18 14:51:33 CLUSTER command