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

Commit5f70a04

Browse files
committed
Make pg_stats example query result a bit less wide, and add comment about
pg_stats.inherited
1 parent9b8a733 commit5f70a04

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

‎doc/src/sgml/perform.sgml

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/perform.sgml,v 1.77 2010/04/28 16:10:40 heikki Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/perform.sgml,v 1.78 2010/04/28 16:48:21 alvherre Exp $ -->
22

33
<chapter id="performance-tips">
44
<title>Performance Tips</title>
@@ -554,16 +554,31 @@ WHERE relname LIKE 'tenk1%';
554554
For example, we might do:
555555

556556
<screen>
557-
SELECT attname, n_distinct, most_common_vals
557+
SELECT attname, inherited, n_distinct,
558+
array_to_string(most_common_vals, E'\n') as most_common_vals
558559
FROM pg_stats
559560
WHERE tablename = 'road';
560561

561-
attname | n_distinct | most_common_vals
562-
---------+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
563-
name | -0.467008 | {"I- 580 Ramp","I- 880 Ramp","Sp Railroad ","I- 580 ","I- 680 Ramp","I- 80 Ramp","14th St ","5th St ","Mission Blvd","I- 880 "}
564-
thepath | 20 | {"[(-122.089,37.71),(-122.0886,37.711)]"}
562+
attname | inherited | n_distinct | most_common_vals
563+
---------+-----------+------------+------------------------------------
564+
name | f | -0.363388 | I- 580 Ramp+
565+
| | | I- 880 Ramp+
566+
| | | Sp Railroad +
567+
| | | I- 580 +
568+
| | | I- 680 Ramp
569+
name | t | -0.284859 | I- 880 Ramp+
570+
| | | I- 580 Ramp+
571+
| | | I- 680 Ramp+
572+
| | | I- 580 +
573+
| | | State Hwy 13 Ramp
565574
(2 rows)
566575
</screen>
576+
577+
Note that two rows are displayed for the same column, one corresponding
578+
to the complete inheritance hierarchy starting at the
579+
<literal>road</literal> table (<literal>inherited</>=<literal>t</>),
580+
and another one including only the <literal>road</literal> table itself
581+
(<literal>inherited</>=<literal>f</>).
567582
</para>
568583

569584
<para>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp