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
fc08814e
Commit
fc08814e
authored
26 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Rename explain's "size" to "rows".
parent
35b16865
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/src/sgml/ref/explain.sgml
+3
-1
3 additions, 1 deletion
doc/src/sgml/ref/explain.sgml
src/backend/commands/explain.c
+2
-2
2 additions, 2 deletions
src/backend/commands/explain.c
src/man/explain.l
+9
-8
9 additions, 8 deletions
src/man/explain.l
with
14 additions
and
11 deletions
doc/src/sgml/ref/explain.sgml
+
3
−
1
View file @
fc08814e
...
...
@@ -102,6 +102,8 @@ Description
<PARA>
This command outputs details about the supplied query.
The default output is the computed query cost.
The cost value is only meaningful to the optimizer in comparing
various query plans.
VERBOSE displays the full query plan and cost to your screen,
and pretty-prints the plan to the postmaster log file.
</para>
...
...
@@ -135,7 +137,7 @@ To show a query plan for a simple query:
postgres=> explain select * from foo;
NOTICE: QUERY PLAN:
Seq Scan on foo (cost=0.00
size
=0 width=4)
Seq Scan on foo (cost=0.00
rows
=0 width=4)
EXPLAIN
</ProgramListing>
...
...
This diff is collapsed.
Click to expand it.
src/backend/commands/explain.c
+
2
−
2
View file @
fc08814e
...
...
@@ -4,7 +4,7 @@
*
* Copyright (c) 1994-5, Regents of the University of California
*
* $Id: explain.c,v 1.3
3
1999/0
3
/23
16:50
:4
6
momjian Exp $
* $Id: explain.c,v 1.3
4
1999/0
4
/23
21:23
:4
8
momjian Exp $
*
*/
#include
<stdio.h>
...
...
@@ -234,7 +234,7 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
}
if
(
es
->
printCost
)
{
appendStringInfo
(
str
,
" (cost=%.2f
size
=%d width=%d)"
,
appendStringInfo
(
str
,
" (cost=%.2f
rows
=%d width=%d)"
,
plan
->
cost
,
plan
->
plan_size
,
plan
->
plan_width
);
}
appendStringInfo
(
str
,
"
\n
"
);
...
...
This diff is collapsed.
Click to expand it.
src/man/explain.l
+
9
−
8
View file @
fc08814e
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/explain.l,v 1.1
0
199
8/08/04 15:00:28
momjian Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/explain.l,v 1.1
1
199
9/04/23 21:23:49
momjian Exp $
.TH EXPLAIN SQL 06/12/97 PostgreSQL PostgreSQL
.SH NAME
explain - explains statement execution details
...
...
@@ -10,21 +10,22 @@ explain - explains statement execution details
.fi
.SH DESCRIPTION
This command outputs details about the supplied query. The default
output is the computed query cost. \f2verbose\f1 displays the full query
plan and cost to your screen, and pretty-prints the plan to the postmaster
log file.
output is the computed query cost. The cost value is only meaningful to
the optimizer in comparing various query plans. \f2verbose\f1 displays
the full query plan and cost to your screen, and pretty-prints the plan
to the postmaster log file.
.SH EXAMPLES
In the examples, the table has a single column of float4.
\fBcost\fR is the cost of scanning a base/join relation,
\fB
size
\fR is the expected number of
tuple
s from a scan,
\fB
rows
\fR is the expected number of
row
s from a scan,
\fBwidth\fR is the length of a tuple.
.nf
tgl=> explain select a from test\g
NOTICE:QUERY PLAN:
Seq Scan on test (cost=0.00
size
=0 width=4)
Seq Scan on test (cost=0.00
rows
=0 width=4)
EXPLAIN
tgl=> explain verbose select sum(a) from test;
...
...
@@ -41,8 +42,8 @@ NOTICE:QUERY PLAN:
:expr {VAR :varno 1 :varattno 1 :vartype 700 :varnoold 1 :varoattno 1}})
:qpqual <> :lefttree <> :righttree <> :scanrelid 1} :righttree <> :numagg 1 }
Aggregate (cost=0.00
size
=0 width=0)
-> Seq Scan on test (cost=0.00
size
=0 width=4)
Aggregate (cost=0.00
rows
=0 width=0)
-> Seq Scan on test (cost=0.00
rows
=0 width=4)
.fi
The Postgres optimizer has chosen to use a sequential scan to retrieve rows from
...
...
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