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

Commit2a997a7

Browse files
committed
A few improvements to analyze and vacuum sections in documentation: add "see
also" entries for autovacuum in analyze and vacuum reference pages, andenhance usage of cross-references in the maintenance page.
1 parenta3ff937 commit2a997a7

File tree

3 files changed

+35
-14
lines changed

3 files changed

+35
-14
lines changed

‎doc/src/sgml/maintenance.sgml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.83 2007/10/06 17:45:49 alvherre Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/maintenance.sgml,v 1.84 2007/10/07 01:16:42 alvherre Exp $ -->
22

33
<chapter id="maintenance">
44
<title>Routine Database Maintenance Tasks</title>
@@ -59,9 +59,9 @@
5959
</indexterm>
6060

6161
<para>
62-
<productname>PostgreSQL</productname>'s <command>VACUUM</> (<xref
63-
linkend="sql-vacuum">) command has to run on a regular basis for several
64-
reasons:
62+
<productname>PostgreSQL</productname>'s
63+
<xreflinkend="sql-vacuum" endterm="sql-vacuum-title"> command has to run on
64+
a regular basis for severalreasons:
6565

6666
<orderedlist>
6767
<listitem>
@@ -96,7 +96,8 @@
9696
</para>
9797

9898
<para>
99-
Fortunately, autovacuum (<xref linkend="autovacuum">) monitors table
99+
Fortunately, <xref linkend="autovacuum" endterm="autovacuum-title">
100+
monitors table
100101
activity and performs <command>VACUUM</command>s when necessary.
101102
Autovacuum works dynamically so it is often better
102103
administration-scheduled vacuuming.
@@ -150,7 +151,8 @@
150151
</para>
151152

152153
<para>
153-
Fortunately, autovacuum (<xref linkend="autovacuum">) monitors table
154+
Fortunately, <xref linkend="autovacuum" endterm="autovacuum-title">
155+
monitors table
154156
activity and performs <command>VACUUM</command>s when necessary. This
155157
eliminates the need for administrators to worry about disk space
156158
recovery in all but the most unusual cases.
@@ -218,7 +220,8 @@
218220
The <productname>PostgreSQL</productname> query planner relies on
219221
statistical information about the contents of tables in order to
220222
generate good plans for queries. These statistics are gathered by
221-
the <command>ANALYZE</> command, which can be invoked by itself or
223+
the <xref linkend="sql-analyze" endterm="sql-analyze-title"> command,
224+
which can be invoked by itself or
222225
as an optional step in <command>VACUUM</>. It is important to have
223226
reasonably accurate statistics, otherwise poor choices of plans might
224227
degrade database performance.
@@ -262,7 +265,8 @@
262265
</tip>
263266

264267
<para>
265-
Fortunately, autovacuum (<xref linkend="autovacuum">) monitors table
268+
Fortunately, <xref linkend="autovacuum" endterm="autovacuum-title">
269+
monitors table
266270
activity and performs <command>ANALYZE</command>s when necessary. This
267271
eliminates the need for administrators to manually schedule
268272
<command>ANALYZE</command>.
@@ -341,8 +345,8 @@
341345
when it was last vacuumed.
342346
If it were to go unvacuumed for longer than that,
343347
data loss could result. To ensure that this does not
344-
happen,the <firstterm>autovacuum</> facility described in
345-
<xref linkend="autovacuum">is invoked on any table
348+
happen,<xref linkend="autovacuum" endterm="autovacuum-title">
349+
is invoked on any table
346350
that might contain XIDs older than the age specified by the
347351
configuration parameter
348352
<xref linkend="guc-autovacuum-freeze-max-age">. (This will happen

‎doc/src/sgml/ref/analyze.sgml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/analyze.sgml,v 1.22 2007/05/15 19:13:55 neilc Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/analyze.sgml,v 1.23 2007/10/07 01:16:42 alvherre Exp $
33
PostgreSQL documentation
44
-->
55

@@ -92,7 +92,12 @@ ANALYZE [ VERBOSE ] [ <replaceable class="PARAMETER">table</replaceable> [ ( <re
9292
<title>Notes</title>
9393

9494
<para>
95-
It is a good idea to run <command>ANALYZE</command> periodically, or
95+
In the default <productname>PostgreSQL</productname> configuration,
96+
<xref linkend="autovacuum" endterm="autovacuum-title">
97+
takes care of automatic analyzing of tables when they are first loaded
98+
with data, and as they change throughout regular operation.
99+
When autovacuum is disabled,
100+
it is a good idea to run <command>ANALYZE</command> periodically, or
96101
just after making major changes in the contents of a table. Accurate
97102
statistics will help the planner to choose the most appropriate query
98103
plan, and thereby improve the speed of query processing. A common
@@ -101,7 +106,7 @@ ANALYZE [ VERBOSE ] [ <replaceable class="PARAMETER">table</replaceable> [ ( <re
101106
</para>
102107

103108
<para>
104-
Unlike <command>VACUUM FULL</command>,<command>ANALYZE</command>
109+
<command>ANALYZE</command>
105110
requires only a read lock on the target table, so it can run in
106111
parallel with other activity on the table.
107112
</para>
@@ -168,4 +173,15 @@ ANALYZE [ VERBOSE ] [ <replaceable class="PARAMETER">table</replaceable> [ ( <re
168173
There is no <command>ANALYZE</command> statement in the SQL standard.
169174
</para>
170175
</refsect1>
176+
177+
<refsect1>
178+
<title>See Also</title>
179+
180+
<simplelist type="inline">
181+
<member><xref linkend="sql-vacuum" endterm="sql-vacuum-title"></member>
182+
<member><xref linkend="app-vacuumdb" endterm="app-vacuumdb-title"></member>
183+
<member><xref linkend="runtime-config-resource-vacuum-cost" endterm="runtime-config-resource-vacuum-cost-title"></member>
184+
<member><xref linkend="autovacuum" endterm="autovacuum-title"></member>
185+
</simplelist>
186+
</refsect1>
171187
</refentry>

‎doc/src/sgml/ref/vacuum.sgml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.48 2007/05/30 19:45:01 momjian Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/vacuum.sgml,v 1.49 2007/10/07 01:16:42 alvherre Exp $
33
PostgreSQL documentation
44
-->
55

@@ -242,6 +242,7 @@ VACUUM
242242
<simplelist type="inline">
243243
<member><xref linkend="app-vacuumdb" endterm="app-vacuumdb-title"></member>
244244
<member><xref linkend="runtime-config-resource-vacuum-cost" endterm="runtime-config-resource-vacuum-cost-title"></member>
245+
<member><xref linkend="autovacuum" endterm="autovacuum-title"></member>
245246
</simplelist>
246247
</refsect1>
247248
</refentry>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp