11<!--
2- $PostgreSQL: pgsql/doc/src/sgml/ref/cluster.sgml,v 1.41 2007/04/0800:26:33 momjian Exp $
2+ $PostgreSQL: pgsql/doc/src/sgml/ref/cluster.sgml,v 1.42 2007/04/0802:07:35 tgl Exp $
33PostgreSQL documentation
44-->
55
@@ -20,7 +20,7 @@ PostgreSQL documentation
2020
2121 <refsynopsisdiv>
2222<synopsis>
23- CLUSTER <replaceable class="PARAMETER">tablename</replaceable>[ USING <replaceable class="PARAMETER">indexname</replaceable>]
23+ CLUSTER <replaceable class="PARAMETER">tablename</replaceable><optional> USING <replaceable class="PARAMETER">indexname</replaceable></optional>
2424CLUSTER
2525</synopsis>
2626 </refsynopsisdiv>
@@ -43,22 +43,24 @@ CLUSTER
4343 based on the index information. Clustering is a one-time operation:
4444 when the table is subsequently updated, the changes are
4545 not clustered. That is, no attempt is made to store new or
46- updated rows according to their index order. If one wishes, one can
47- periodically recluster by issuing the command again.
46+ updated rows according to their index order. (If one wishes, one can
47+ periodically recluster by issuing the command again. Also, setting
48+ the table's FILLFACTOR storage parameter to less than 100% can aid
49+ in preserving cluster ordering during updates, since updated rows
50+ are preferentially kept on the same page.)
4851 </para>
4952
5053 <para>
5154 When a table is clustered, <productname>PostgreSQL</productname>
52- rememberson which index it was clustered. The form
55+ remembers which index it was clustered by . The form
5356 <command>CLUSTER <replaceable class="parameter">tablename</replaceable></command>
54- reclusters the tableon the same indexthat it was clustered before.
57+ reclusters the tableusing the same indexas before.
5558 </para>
5659
5760 <para>
58- <command>CLUSTER</command> without any parameter reclusters all the tables
59- in the
60- current database that the calling user owns, or all tables if called
61- by a superuser. (Never-clustered tables are not included.) This
61+ <command>CLUSTER</command> without any parameter reclusters all the
62+ previously-clustered tables in the current database that the calling user
63+ owns, or all such tables if called by a superuser. This
6264 form of <command>CLUSTER</command> cannot be executed inside a transaction
6365 block.
6466 </para>
@@ -197,12 +199,16 @@ CLUSTER;
197199 <title>Compatibility</title>
198200
199201 <para>
200- The syntax:
202+ There is no <command>CLUSTER</command> statement in the SQL standard.
203+ </para>
204+
205+ <para>
206+ The syntax
201207<synopsis>
202208CLUSTER <replaceable class="PARAMETER">indexname</replaceable> ON <replaceable class="PARAMETER">tablename</replaceable>
203209</synopsis>
204- is also supported for compatibility with pre-8.3 <productname>PostgreSQL</> installations.
205- There is no <command>CLUSTER</command> statement in the SQL standard .
210+ is also supported for compatibility with pre-8.3 <productname>PostgreSQL</>
211+ versions .
206212 </para>
207213 </refsect1>
208214