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

Commitad893a3

Browse files
author
Neil Conway
committed
Minor SGML improvements.
1 parentad47617 commitad893a3

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

‎doc/src/sgml/perform.sgml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/perform.sgml,v 1.49 2004/12/23 23:07:38 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/perform.sgml,v 1.50 2005/02/0307:12:37 neilc Exp $
33
-->
44

55
<chapter id="performance-tips">
@@ -362,12 +362,13 @@ EXPLAIN ANALYZE SELECT * FROM tenk1 t1, tenk2 t2 WHERE t1.unique1 &lt; 50 AND t1
362362
</para>
363363

364364
<para>
365-
One component of the statistics is the total number of entries in each
366-
table and index, as well as the number of disk blocks occupied by each
367-
table and index. This information is kept in the table
368-
<structname>pg_class</structname> in the columns <structfield>reltuples</structfield>
369-
and <structfield>relpages</structfield>. We can look at it
370-
with queries similar to this one:
365+
One component of the statistics is the total number of entries in
366+
each table and index, as well as the number of disk blocks occupied
367+
by each table and index. This information is kept in the table
368+
<link linkend="catalog-pg-class"><structname>pg_class</structname></link>, in
369+
the columns <structfield>reltuples</structfield> and
370+
<structfield>relpages</structfield>. We can look at it with
371+
queries similar to this one:
371372

372373
<screen>
373374
SELECT relname, relkind, reltuples, relpages FROM pg_class WHERE relname LIKE 'tenk1%';
@@ -406,14 +407,16 @@ SELECT relname, relkind, reltuples, relpages FROM pg_class WHERE relname LIKE 't
406407

407408
<para>
408409
Most queries retrieve only a fraction of the rows in a table, due
409-
to having <literal>WHERE</> clauses that restrict the rows to be examined.
410-
The planner thus needs to make an estimate of the
411-
<firstterm>selectivity</> of <literal>WHERE</> clauses, that is, the fraction of
412-
rows that match each condition in the <literal>WHERE</> clause. The information
413-
used for this task is stored in the <structname>pg_statistic</structname>
414-
system catalog. Entries in <structname>pg_statistic</structname> are
415-
updated by <command>ANALYZE</> and <command>VACUUM ANALYZE</> commands
416-
and are always approximate even when freshly updated.
410+
to having <literal>WHERE</> clauses that restrict the rows to be
411+
examined. The planner thus needs to make an estimate of the
412+
<firstterm>selectivity</> of <literal>WHERE</> clauses, that is,
413+
the fraction of rows that match each condition in the
414+
<literal>WHERE</> clause. The information used for this task is
415+
stored in the <link linkend="catalog-pg-statistic"><structname>pg_statistic</structname></link>
416+
system catalog. Entries in <structname>pg_statistic</structname>
417+
are updated by the <command>ANALYZE</> and <command>VACUUM
418+
ANALYZE</> commands and are always approximate even when freshly
419+
updated.
417420
</para>
418421

419422
<indexterm>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp