pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Browne <cbbrowne@acm.org>
To: pgsql-performance@postgresql.org
Subject: Re: Clustered tables improves perfs ?
Date: Thu, 13 Sep 2007 10:49:57 -0400
Message-ID: <608x7azkkq.fsf@dba2.int.libertyrms.com> (raw)
References: <46E9353A.9080602@agematis.com>

pcastet@agematis.com (Patrice Castet) writes:
> I wonder if clustering a table improves perfs somehow ?
> Any example/ideas about that ?
> ref : http://www.postgresql.org/docs/8.2/interactive/sql-cluster.html

Sometimes.

1.  It compacts the table, which may be of value, particularly if the
table is not seeing heavy UPDATE/DELETE traffic.  VACUUM and VACUUM
FULL do somewhat similar things; if you are using VACUUM frequently
enough, this is not likely to have a material effect.

2.  It transforms the contents of the table into some specified order,
which will improve efficiency for any queries that use that specific
ordering.
-- 
output = reverse("moc.enworbbc" "@" "enworbbc")
http://linuxdatabases.info/info/emacs.html
"You can swear at the keyboard  and it won't be offended. It was going
to treat you badly anyway" -- Arthur Norman



view thread (3+ messages)

Message-ID: <608x7azkkq.fsf@dba2.int.libertyrms.com>
Permalink:  ../608x7azkkq.fsf@dba2.int.libertyrms.com/
Also on:    postgresql.org/message-id/608x7azkkq.fsf@dba2.int.libertyrms.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: cbbrowne@acm.org
  Subject: Re: Clustered tables improves perfs ?
  In-Reply-To: <608x7azkkq.fsf@dba2.int.libertyrms.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox