Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit006fd92

Browse files
committed
Cluster fixup.
1 parent3674ccd commit006fd92

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

‎src/man/cluster.l

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.\" This is -*-nroff-*-
22
.\" XXX standard disclaimer belongs here....
3-
.\" $Header: /cvsroot/pgsql/src/man/Attic/cluster.l,v 1.5 1998/03/1421:57:56 momjian Exp $
3+
.\" $Header: /cvsroot/pgsql/src/man/Attic/cluster.l,v 1.6 1998/03/1422:55:21 momjian Exp $
44
.TH CLUSTER SQL 01/23/93 PostgreSQL PostgreSQL
55
.SH NAME
66
cluster - give storage clustering advice to Postgres
@@ -48,11 +48,12 @@ unordered, the entries are on random pages, so there is one disk page
4848
retrieved for every row moved. PostgreSQL has a cache, but the majority
4949
of a big table will not fit in the cache.
5050
.PP
51-
Another way is to use SELECT ... INTO TABLE temp FROM ... This uses the
52-
PostgreSQL sorting code, and is much faster for unordered data. You
53-
then drop the old table, use ALTER TABLE RENAME to rename 'temp' to the
54-
old name, and recreate the indexes. From then on, CLUSTER should be
55-
fast because most of the heap data is ordered.
51+
Another way is to use SELECT ... INTO TABLE temp FROM ...ORDER BY ...
52+
This uses the PostgreSQL sorting code in ORDER BY to match the index,
53+
and is much faster for unordered data. You then drop the old table, use
54+
ALTER TABLE RENAME to rename 'temp' to the old name, and recreate the
55+
indexes. From then on, CLUSTER should be fast because most of the heap
56+
data has been already ordered.
5657
.SH EXAMPLE
5758
.nf
5859
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp