File: cluster.l.html

package info (click to toggle)
mpsql 2.0-2
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 2,912 kB
  • ctags: 5,665
  • sloc: ansic: 34,322; makefile: 3,525; sh: 17
file content (51 lines) | stat: -rw-r--r-- 1,828 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!-- manual page source format generated by PolyglotMan v3.0.4, -->
<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->

<HTML>
<HEAD>
<TITLE>CLUSTER(SQL) manual page</TITLE>
</HEAD>
<BODY>
<A HREF="sql.html">SQL Reference Contents</A>
 
<H2><A NAME="sect0" HREF="#toc0">NAME </A></H2>
cluster - give storage clustering advice to Postgres  
<H2><A NAME="sect1" HREF="#toc1">SYNOPSIS </A></H2>
<B>cluster 
</B> indexname <B>on </B> attname <BR>
  
<H2><A NAME="sect2" HREF="#toc2">DESCRIPTION </A></H2>
This command instructs Postgres to 
cluster the class specified by <I>classname</I> approximately based on the index 
specified by  <I>indexname.</I> The index must already have been defined on  <I>classname.</I> 
<P>
When a class is clustered, it is physically reordered based on the index 
information.  The clustering is static.  In other words, if the class is 
updated, it may become unclustered.  No attempt is made to keep new instances 
or updated tuples clustered.  If desired, the user can recluster manually 
by issuing the command again. <P>
The table is actually copied to temporary 
table in index order, then renamed back to the original name.  For this 
reason, all grant permissions and other indexes are lost when cluster 
is performed.  
<H2><A NAME="sect3" HREF="#toc3">EXAMPLE </A></H2>
/* <BR>
  * cluster employees in based on its salary 
attribute <BR>
  */ <BR>
 create index emp_ind on emp using btree (salary int4_ops); 
<BR>
 <P>
 cluster emp_ind on emp <BR>
 <P>
 <P>

<HR><P>
<A NAME="toc"><B>Table of Contents</B></A><P>
<UL>
<LI><A NAME="toc0" HREF="#sect0">NAME</A></LI>
<LI><A NAME="toc1" HREF="#sect1">SYNOPSIS</A></LI>
<LI><A NAME="toc2" HREF="#sect2">DESCRIPTION</A></LI>
<LI><A NAME="toc3" HREF="#sect3">EXAMPLE</A></LI>
</UL>
</BODY></HTML>