1
1
<!--
2
- $PostgreSQL: pgsql/doc/src/sgml/ref/cluster.sgml,v 1.41 2007/04/08 00:26:33 momjian Exp $
2
+ $PostgreSQL: pgsql/doc/src/sgml/ref/cluster.sgml,v 1.42 2007/04/08 02:07:35 tgl Exp $
3
3
PostgreSQL documentation
4
4
-->
5
5
@@ -20,7 +20,7 @@ PostgreSQL documentation
20
20
21
21
<refsynopsisdiv>
22
22
<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>
24
24
CLUSTER
25
25
</synopsis>
26
26
</refsynopsisdiv>
@@ -43,22 +43,24 @@ CLUSTER
43
43
based on the index information. Clustering is a one-time operation:
44
44
when the table is subsequently updated, the changes are
45
45
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.)
48
51
</para>
49
52
50
53
<para>
51
54
When a table is clustered, <productname>PostgreSQL</productname>
52
- remembers on which index it was clustered. The form
55
+ remembers which index it was clustered by . The form
53
56
<command>CLUSTER <replaceable class="parameter">tablename</replaceable></command>
54
- reclusters the table on the same index that it was clustered before.
57
+ reclusters the table using the same index as before.
55
58
</para>
56
59
57
60
<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
62
64
form of <command>CLUSTER</command> cannot be executed inside a transaction
63
65
block.
64
66
</para>
@@ -197,12 +199,16 @@ CLUSTER;
197
199
<title>Compatibility</title>
198
200
199
201
<para>
200
- The syntax:
202
+ There is no <command>CLUSTER</command> statement in the SQL standard.
203
+ </para>
204
+
205
+ <para>
206
+ The syntax
201
207
<synopsis>
202
208
CLUSTER <replaceable class="PARAMETER">indexname</replaceable> ON <replaceable class="PARAMETER">tablename</replaceable>
203
209
</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 .
206
212
</para>
207
213
</refsect1>
208
214
0 commit comments