Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
5f70a04c
Commit
5f70a04c
authored
14 years ago
by
Alvaro Herrera
Browse files
Options
Downloads
Patches
Plain Diff
Make pg_stats example query result a bit less wide, and add comment about
pg_stats.inherited
parent
9b8a7332
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/src/sgml/perform.sgml
+21
-6
21 additions, 6 deletions
doc/src/sgml/perform.sgml
with
21 additions
and
6 deletions
doc/src/sgml/perform.sgml
+
21
−
6
View file @
5f70a04c
<!-- $PostgreSQL: pgsql/doc/src/sgml/perform.sgml,v 1.7
7
2010/04/28 16:
10:40 heikki
Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/perform.sgml,v 1.7
8
2010/04/28 16:
48:21 alvherre
Exp $ -->
<chapter id="performance-tips">
<chapter id="performance-tips">
<title>Performance Tips</title>
<title>Performance Tips</title>
...
@@ -554,16 +554,31 @@ WHERE relname LIKE 'tenk1%';
...
@@ -554,16 +554,31 @@ WHERE relname LIKE 'tenk1%';
For example, we might do:
For example, we might do:
<screen>
<screen>
SELECT attname, n_distinct, most_common_vals
SELECT attname, inherited, n_distinct,
array_to_string(most_common_vals, E'\n') as most_common_vals
FROM pg_stats
FROM pg_stats
WHERE tablename = 'road';
WHERE tablename = 'road';
attname | n_distinct | most_common_vals
attname | inherited | n_distinct | most_common_vals
---------+------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------+-----------+------------+------------------------------------
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 "}
name | f | -0.363388 | I- 580 Ramp+
thepath | 20 | {"[(-122.089,37.71),(-122.0886,37.711)]"}
| | | I- 880 Ramp+
| | | Sp Railroad +
| | | I- 580 +
| | | I- 680 Ramp
name | t | -0.284859 | I- 880 Ramp+
| | | I- 580 Ramp+
| | | I- 680 Ramp+
| | | I- 580 +
| | | State Hwy 13 Ramp
(2 rows)
(2 rows)
</screen>
</screen>
Note that two rows are displayed for the same column, one corresponding
to the complete inheritance hierarchy starting at the
<literal>road</literal> table (<literal>inherited</>=<literal>t</>),
and another one including only the <literal>road</literal> table itself
(<literal>inherited</>=<literal>f</>).
</para>
</para>
<para>
<para>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment