Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
fc08814e
Commit
fc08814e
authored
Apr 23, 1999
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename explain's "size" to "rows".
parent
35b16865
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
doc/src/sgml/ref/explain.sgml
doc/src/sgml/ref/explain.sgml
+3
-1
src/backend/commands/explain.c
src/backend/commands/explain.c
+2
-2
src/man/explain.l
src/man/explain.l
+9
-8
No files found.
doc/src/sgml/ref/explain.sgml
View file @
fc08814e
...
@@ -102,6 +102,8 @@ Description
...
@@ -102,6 +102,8 @@ Description
<PARA>
<PARA>
This command outputs details about the supplied query.
This command outputs details about the supplied query.
The default output is the computed query cost.
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,
VERBOSE displays the full query plan and cost to your screen,
and pretty-prints the plan to the postmaster log file.
and pretty-prints the plan to the postmaster log file.
</para>
</para>
...
@@ -135,7 +137,7 @@ To show a query plan for a simple query:
...
@@ -135,7 +137,7 @@ To show a query plan for a simple query:
postgres=> explain select * from foo;
postgres=> explain select * from foo;
NOTICE: QUERY PLAN:
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
EXPLAIN
</ProgramListing>
</ProgramListing>
...
...
src/backend/commands/explain.c
View file @
fc08814e
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
*
*
* Copyright (c) 1994-5, Regents of the University of California
* Copyright (c) 1994-5, Regents of the University of California
*
*
* $Id: explain.c,v 1.3
3 1999/03/23 16:50:46
momjian Exp $
* $Id: explain.c,v 1.3
4 1999/04/23 21:23:48
momjian Exp $
*
*
*/
*/
#include <stdio.h>
#include <stdio.h>
...
@@ -234,7 +234,7 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
...
@@ -234,7 +234,7 @@ explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
}
}
if
(
es
->
printCost
)
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
);
plan
->
cost
,
plan
->
plan_size
,
plan
->
plan_width
);
}
}
appendStringInfo
(
str
,
"
\n
"
);
appendStringInfo
(
str
,
"
\n
"
);
...
...
src/man/explain.l
View file @
fc08814e
.\" This is -*-nroff-*-
.\" This is -*-nroff-*-
.\" XXX standard disclaimer belongs here....
.\" XXX standard disclaimer belongs here....
.\" $Header: /cvsroot/pgsql/src/man/Attic/explain.l,v 1.1
0 1998/08/04 15:00:28
momjian Exp $
.\" $Header: /cvsroot/pgsql/src/man/Attic/explain.l,v 1.1
1 1999/04/23 21:23:49
momjian Exp $
.TH EXPLAIN SQL 06/12/97 PostgreSQL PostgreSQL
.TH EXPLAIN SQL 06/12/97 PostgreSQL PostgreSQL
.SH NAME
.SH NAME
explain - explains statement execution details
explain - explains statement execution details
...
@@ -10,21 +10,22 @@ explain - explains statement execution details
...
@@ -10,21 +10,22 @@ explain - explains statement execution details
.fi
.fi
.SH DESCRIPTION
.SH DESCRIPTION
This command outputs details about the supplied query. The default
This command outputs details about the supplied query. The default
output is the computed query cost. \f2verbose\f1 displays the full query
output is the computed query cost. The cost value is only meaningful to
plan and cost to your screen, and pretty-prints the plan to the postmaster
the optimizer in comparing various query plans. \f2verbose\f1 displays
log file.
the full query plan and cost to your screen, and pretty-prints the plan
to the postmaster log file.
.SH EXAMPLES
.SH EXAMPLES
In the examples, the table has a single column of float4.
In the examples, the table has a single column of float4.
\fBcost\fR is the cost of scanning a base/join relation,
\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.
\fBwidth\fR is the length of a tuple.
.nf
.nf
tgl=> explain select a from test\g
tgl=> explain select a from test\g
NOTICE:QUERY PLAN:
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
EXPLAIN
tgl=> explain verbose select sum(a) from test;
tgl=> explain verbose select sum(a) from test;
...
@@ -41,8 +42,8 @@ NOTICE:QUERY PLAN:
...
@@ -41,8 +42,8 @@ NOTICE:QUERY PLAN:
:expr {VAR :varno 1 :varattno 1 :vartype 700 :varnoold 1 :varoattno 1}})
:expr {VAR :varno 1 :varattno 1 :vartype 700 :varnoold 1 :varoattno 1}})
:qpqual <> :lefttree <> :righttree <> :scanrelid 1} :righttree <> :numagg 1 }
:qpqual <> :lefttree <> :righttree <> :scanrelid 1} :righttree <> :numagg 1 }
Aggregate (cost=0.00
size
=0 width=0)
Aggregate (cost=0.00
rows
=0 width=0)
-> Seq Scan on test (cost=0.00
size
=0 width=4)
-> Seq Scan on test (cost=0.00
rows
=0 width=4)
.fi
.fi
The Postgres optimizer has chosen to use a sequential scan to retrieve rows from
The Postgres optimizer has chosen to use a sequential scan to retrieve rows from
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment